Class representing any relationship other than inheritance.
More...
Class representing any relationship other than inheritance.
This class represents all kinds of relationships between diagram elements, except for inheritance which are handled in a special way (See clanguml::class_diagram::model::class_parent).
Definition at line 39 of file relationship.h.
#include <relationship.h>
◆ relationship()
clanguml::common::model::relationship::relationship |
( |
relationship_t |
type, |
|
|
eid_t |
destination, |
|
|
access_t |
access = access_t::kPublic , |
|
|
std::string |
label = "" , |
|
|
std::string |
multiplicity_source = "" , |
|
|
std::string |
multiplicity_destination = "" |
|
) |
| |
Constructor.
- Parameters
-
type | Type of relationship |
destination | Id of the relationship target |
access | Access scope of the relationship |
label | Relationship label |
multiplicity_source | Multiplicity at the source |
multiplicity_destination | Multiplicity at the destination |
Definition at line 25 of file relationship.cc.
◆ ~relationship()
clanguml::common::model::relationship::~relationship |
( |
| ) |
|
|
overridedefault |
◆ access()
access_t clanguml::common::model::relationship::access |
( |
| ) |
const |
|
noexcept |
Get the relationship access scope (e.g. public
).
- Returns
- Access scope
Definition at line 76 of file relationship.cc.
◆ destination()
eid_t clanguml::common::model::relationship::destination |
( |
| ) |
const |
Get the id of the target element of this relationship.
- Returns
- Target element id.
Definition at line 46 of file relationship.cc.
◆ label()
std::string clanguml::common::model::relationship::label |
( |
| ) |
const |
Get the relationship label.
- Returns
- Relationoship label.
Definition at line 72 of file relationship.cc.
◆ multiplicity_destination()
std::string clanguml::common::model::relationship::multiplicity_destination |
( |
| ) |
const |
Set the relationship multiplicity at the destination.
- Returns
- Destination multiplicity.
Definition at line 65 of file relationship.cc.
◆ multiplicity_source()
std::string clanguml::common::model::relationship::multiplicity_source |
( |
| ) |
const |
Set the relationship multiplicity at the source.
- Returns
- Source multiplicity.
Definition at line 54 of file relationship.cc.
◆ set_access()
void clanguml::common::model::relationship::set_access |
( |
access_t |
scope | ) |
|
|
noexcept |
Set the access scope for this relationship (e.g public
)
- Parameters
-
Definition at line 74 of file relationship.cc.
◆ set_destination()
void clanguml::common::model::relationship::set_destination |
( |
eid_t |
destination | ) |
|
Set id of the diagram element which is the target of this relationship.
- Parameters
-
destination | Target element id. |
Definition at line 41 of file relationship.cc.
◆ set_label()
void clanguml::common::model::relationship::set_label |
( |
const std::string & |
label | ) |
|
◆ set_multiplicity_destination()
void clanguml::common::model::relationship::set_multiplicity_destination |
( |
const std::string & |
multiplicity_destination | ) |
|
Set the relationship multiplicity at the destination.
- Parameters
-
multiplicity_destination | Destination multiplicity. |
Definition at line 59 of file relationship.cc.
◆ set_multiplicity_source()
void clanguml::common::model::relationship::set_multiplicity_source |
( |
const std::string & |
multiplicity_source | ) |
|
Set the relationship multiplicity at the source.
- Parameters
-
multiplicity_source | Source multiplicity. |
Definition at line 48 of file relationship.cc.
◆ set_type()
void clanguml::common::model::relationship::set_type |
( |
relationship_t |
type | ) |
|
|
noexcept |
Set the type of relatinoship.
- Parameters
-
type | Type of relationship. |
Definition at line 37 of file relationship.cc.
◆ type()
Get the type of relatinoship.
- Returns
- Type of relationship.
Definition at line 39 of file relationship.cc.
◆ operator==
Definition at line 78 of file relationship.cc.
79{
80 return l.type() == r.type() && l.destination() == r.destination() &&
81 l.label() == r.label();
82}
◆ access_
access_t clanguml::common::model::relationship::access_ |
|
private |
◆ destination_
eid_t clanguml::common::model::relationship::destination_ |
|
private |
◆ label_
std::string clanguml::common::model::relationship::label_ |
|
private |
◆ multiplicity_destination_
std::string clanguml::common::model::relationship::multiplicity_destination_ |
|
private |
◆ multiplicity_source_
std::string clanguml::common::model::relationship::multiplicity_source_ |
|
private |
◆ type_
The documentation for this class was generated from the following files: