0.6.0
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 422 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 423 of file yaml_decoders.cc.

424 {
425 assert(node.Type() == NodeType::Scalar);
426
427 auto relationship_name = node.as<std::string>();
428 if (relationship_name == "extension" ||
429 relationship_name == "inheritance") {
430 rhs = relationship_t::kExtension;
431 }
432 else if (relationship_name == "composition") {
433 rhs = relationship_t::kComposition;
434 }
435 else if (relationship_name == "aggregation") {
436 rhs = relationship_t::kAggregation;
437 }
438 else if (relationship_name == "containment") {
439 rhs = relationship_t::kContainment;
440 }
441 else if (relationship_name == "ownership") {
442 rhs = relationship_t::kOwnership;
443 }
444 else if (relationship_name == "association") {
445 rhs = relationship_t::kAssociation;
446 }
447 else if (relationship_name == "instantiation") {
448 rhs = relationship_t::kInstantiation;
449 }
450 else if (relationship_name == "friendship") {
451 rhs = relationship_t::kFriendship;
452 }
453 else if (relationship_name == "dependency") {
454 rhs = relationship_t::kDependency;
455 }
456 else if (relationship_name == "none") {
457 rhs = relationship_t::kNone;
458 }
459 else
460 return false;
461
462 return true;
463 }

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