MorphoGraphX
|
Type of a undirected edge (or arc) More...
#include <Edge.hpp>
Public Types | |
typedef edge_identity_t | identity_t |
Type of the identity of a vertex. | |
typedef EdgeContent | content_t |
typedef Edge< EdgeContent > | edge_t |
Public Member Functions | |
Arc () | |
Cosntruct an empty (null) arc. | |
Arc (const Arc ©) | |
Copy constructor. | |
Arc (identity_t src, identity_t tgt, EdgeContent *c1, EdgeContent *c2) | |
Full constructor -> should never be called by the user. | |
operator edge_t () const | |
Convert the current arc into the corresponding edge. | |
Arc | inv () const |
Synchronize the edges and returns the opposite arc. | |
Arc | operator- () const |
Unary '-' operator synchronize edges and returns opposite arc. | |
~Arc () | |
Destroy and copy the content of the arcs. | |
bool | isNull () const |
Test if the content is null. | |
operator bool () const | |
AN arc evaluates to true if it contains some data. | |
EdgeContent & | operator* () const |
Reference the content of the arc. | |
EdgeContent * | operator-> () const |
Reference the content of the arc as a pointer. | |
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 | sync () const |
Synchronize both sides of the arc. | |
Protected Attributes | |
identity_t | _source |
identity_t | _target |
EdgeContent * | main |
EdgeContent * | other |
Type of a undirected edge (or arc)
When an arc is destroyed, the content of the main edge is copied in the other one.
Note that you should never keep an arc! Is is meant for temporary usage. This is why there is no copy constructor or operator=.
|
inline |
Returns the identifier of the source of the edge.
|
inline |
Returns the identifier of the target of the edge.