MorphoGraphX
|
#include <Edge.hpp>
Public Types | |
typedef edge_identity_t | identity_t |
Type of the identity of a vertex. | |
typedef EdgeContent | content_t |
Type of the content of the edge. | |
typedef EdgeContent * | pointer |
Type of the equivalent pointer. | |
Public Member Functions | |
Edge () | |
Creates a null edge. | |
Edge (identity_t src, identity_t tgt, EdgeContent *content) | |
Creates an edge from src to tgt with a given content. More... | |
Edge (const Edge ©) | |
Get a new weak reference on the copy. | |
EdgeContent * | operator-> () const |
Data access. More... | |
EdgeContent & | operator* () const |
Data access. More... | |
template<typename R > | |
R & | operator->* (R EdgeContent::*ptr) |
Access to the data via pointer to member. | |
template<typename R > | |
const R & | operator->* (R EdgeContent::*ptr) const |
Constant access to the data via pointer to member. | |
Edge & | operator= (const Edge &other) |
Change the reference help by the object. | |
bool | operator== (const Edge &other) const |
Comparison operators. More... | |
bool | operator!= (const Edge &other) const |
Comparison operators. More... | |
bool | operator> (const Edge &other) const |
Comparison operators. More... | |
bool | operator< (const Edge &other) const |
Comparison operators. More... | |
bool | isNull () const |
Test if an edge is null. | |
operator bool () const | |
Convert an edge to true if it is not null. | |
identity_t | source () const |
Returns the identifier of the source of the edge. More... | |
identity_t | target () const |
Returns the identifier of the target of the edge. More... | |
void | clear () |
Reset an edge weak pointer to null. | |
Static Public Attributes | |
static Edge | null |
Protected Attributes | |
identity_t | _source |
Identity of the source of the edge. | |
identity_t | _target |
Identity of the target of the edge. | |
EdgeContent * | _content |
Content of the edge. | |
Edge of a vv graph.
The edges represent weak references on the edges data. The data are owned by the graph. You must never try to access an edge that was deleted from its graph.
mgx::graph::Edge< EdgeContent >::Edge | ( | identity_t | src, |
identity_t | tgt, | ||
EdgeContent * | content | ||
) |
Creates an edge from src
to tgt
with a given content.
The object do not take ownership of the content which must then be kept alive for as long as needed.
|
inline |
Comparison operators.
|
inline |
Data access.
|
inline |
Data access.
|
inline |
Comparison operators.
|
inline |
Comparison operators.
|
inline |
Comparison operators.
|
inline |
Returns the identifier of the source of the edge.
|
inline |
Returns the identifier of the target of the edge.