0.5.4
C++ to UML diagram generator based on Clang
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
YAML::convert< relationship_t > Struct Reference

Detailed Description

Definition at line 364 of file yaml_decoders.cc.

Static Public Member Functions

static bool decode (const Node &node, relationship_t &rhs)
 

Member Function Documentation

◆ decode()

static bool YAML::convert< relationship_t >::decode ( const Node &  node,
relationship_t &  rhs 
)
inlinestatic

Definition at line 365 of file yaml_decoders.cc.

366 {
367 assert(node.Type() == NodeType::Scalar);
368
369 auto relationship_name = node.as<std::string>();
370 if (relationship_name == "extension" ||
371 relationship_name == "inheritance") {
372 rhs = relationship_t::kExtension;
373 }
374 else if (relationship_name == "composition") {
375 rhs = relationship_t::kComposition;
376 }
377 else if (relationship_name == "aggregation") {
378 rhs = relationship_t::kAggregation;
379 }
380 else if (relationship_name == "containment") {
381 rhs = relationship_t::kContainment;
382 }
383 else if (relationship_name == "ownership") {
384 rhs = relationship_t::kOwnership;
385 }
386 else if (relationship_name == "association") {
387 rhs = relationship_t::kAssociation;
388 }
389 else if (relationship_name == "instantiation") {
390 rhs = relationship_t::kInstantiation;
391 }
392 else if (relationship_name == "friendship") {
393 rhs = relationship_t::kFriendship;
394 }
395 else if (relationship_name == "dependency") {
396 rhs = relationship_t::kDependency;
397 }
398 else if (relationship_name == "none") {
399 rhs = relationship_t::kNone;
400 }
401 else
402 return false;
403
404 return true;
405 }

The documentation for this struct was generated from the following file: