21 #include <unordered_map> 23 #include "attributes.h" 29 using EdgePtr = std::shared_ptr<BaseEdge>;
38 friend class TestEdge;
41 struct constructor_key { };
65 inline int id()
const;
78 const Node& m_neighbour;
80 const bool m_ownsAttrs;
94 {
return m_neighbour; }
100 {
return m_attrs->
value(
id); }
103 {
return m_attrs->
value(name, defaultValue); }
A class for variant data types (tagged union).
Definition: value.h:56
It wraps a std::shared_ptr<BaseNode>.
Definition: node.h:35
void addAttr(QString name, Value value)
Appends the attribute name with the value value.
Definition: edge_p.h:108
const Node & neighbour() const
Gets the target Node.
Definition: edge_p.h:93
void setValue(int id, const Value &value)
Sets the value at id.
Definition: attributes.h:221
const Value & value(int id) const
Gets the value of the attribute at id.
Definition: attributes.h:213
const Node & origin() const
Gets the source Node.
Definition: edge_p.h:90
int id() const
Gets the edge's id.
Definition: edge_p.h:87
void setAttr(int id, const Value &value)
Sets the value at id.
Definition: edge_p.h:105
const Value & attr(int id) const
Gets the value of the attribute at id.
Definition: edge_p.h:99
Definition: abstractgraph.h:29
const Attributes * attrs() const
Gets the edge's attributes.
Definition: edge_p.h:96
A container of labeled values.
Definition: attributes.h:39
Abstract base class for graph plugins.
Definition: abstractgraph.h:54
An Edge connects a node to itself or to another node.
Definition: edge_p.h:35
void push_back(QString name, Value value)
Appends the attribute name with the value value.
Definition: attributes.h:197