#include <graph/edge.h>
Public Types | |
typedef EdgeContent | content_t |
Type of the content of the edge. | |
typedef edge_identity_t | identity_t |
Type of the identity of a vertex. | |
typedef EdgeContent * | pointer |
Type of the equivalent pointer. | |
Public Member Functions | |
void | clear () |
Reset an edge weak pointer to null. | |
Edge (const Edge ©) | |
Get a new weak reference on the copy. | |
Edge (identity_t src, identity_t tgt, EdgeContent *content) | |
Creates an edge from src to tgt with a given content. | |
Edge () | |
Creates a null edge. | |
bool | isNull () const |
Test if an edge is null. | |
operator bool () const | |
Convert an edge to true if it is not null. | |
bool | operator!= (const Edge &other) const |
Comparison operators. | |
EdgeContent & | operator* () const |
Data access. | |
EdgeContent * | operator-> () const |
Data access. | |
template<typename R > | |
const R & | operator->* (R EdgeContent::*ptr) const |
Constant access to the data via pointer to member. | |
template<typename R > | |
R & | operator->* (R EdgeContent::*ptr) |
Access to the data via pointer to member. | |
bool | operator< (const Edge &other) const |
Comparison operators. | |
bool | operator<= (const Edge &other) const |
Comparison operators. | |
Edge & | operator= (const Edge &other) |
Change the reference help by the object. | |
bool | operator== (const Edge &other) const |
Comparison operators. | |
bool | operator> (const Edge &other) const |
Comparison operators. | |
bool | operator>= (const Edge &other) const |
Comparison operators. | |
bool | serialize (storage::VVEStorage &) |
Serialization method. | |
identity_t | source () const |
Returns the identifier of the source of the edge. | |
identity_t | target () const |
Returns the identifier of the target of the edge. | |
Static Public Attributes | |
static Edge | null |
Protected Attributes | |
EdgeContent * | _content |
Content of the edge. | |
identity_t | _source |
Identity of the source of the edge. | |
identity_t | _target |
Identity of the target 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.
Definition at line 33 of file edge.h.
typedef EdgeContent graph::Edge< EdgeContent >::content_t |
typedef edge_identity_t graph::Edge< EdgeContent >::identity_t |
typedef EdgeContent* graph::Edge< EdgeContent >::pointer |
graph::Edge< EdgeContent >::Edge | ( | ) | [inline] |
graph::Edge< EdgeContent >::Edge | ( | identity_t | src, | |
identity_t | tgt, | |||
EdgeContent * | content | |||
) | [inline] |
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.
graph::Edge< EdgeContent >::Edge | ( | const Edge< EdgeContent > & | copy | ) | [inline] |
void graph::Edge< EdgeContent >::clear | ( | ) | [inline] |
Reset an edge weak pointer to null.
Definition at line 185 of file edge.h.
References graph::Edge< EdgeContent >::_content, graph::Edge< EdgeContent >::_source, and graph::Edge< EdgeContent >::_target.
bool graph::Edge< EdgeContent >::isNull | ( | ) | const [inline] |
Test if an edge is null.
Definition at line 160 of file edge.h.
References graph::Edge< EdgeContent >::_content.
00160 { return _content == 0; }
graph::Edge< EdgeContent >::operator bool | ( | ) | const [inline] |
Convert an edge to true
if it is not null.
Definition at line 165 of file edge.h.
References graph::Edge< EdgeContent >::_content.
00165 { return _content != 0; }
bool graph::Edge< EdgeContent >::operator!= | ( | const Edge< EdgeContent > & | other | ) | const [inline] |
Comparison operators.
Definition at line 130 of file edge.h.
References graph::Edge< EdgeContent >::_content.
00130 { return _content != other._content; }
EdgeContent& graph::Edge< EdgeContent >::operator* | ( | ) | const [inline] |
Data access.
Definition at line 90 of file edge.h.
References graph::Edge< EdgeContent >::_content.
00090 { return *_content; }
EdgeContent* graph::Edge< EdgeContent >::operator-> | ( | ) | const [inline] |
Data access.
Definition at line 82 of file edge.h.
References graph::Edge< EdgeContent >::_content.
00082 { return _content; }
const R& graph::Edge< EdgeContent >::operator->* | ( | R EdgeContent::* | ptr | ) | const [inline] |
Constant access to the data via pointer to member.
Definition at line 104 of file edge.h.
References graph::Edge< EdgeContent >::_content.
00105 { 00106 return _content->*ptr; 00107 }
R& graph::Edge< EdgeContent >::operator->* | ( | R EdgeContent::* | ptr | ) | [inline] |
Access to the data via pointer to member.
Definition at line 96 of file edge.h.
References graph::Edge< EdgeContent >::_content.
00097 { 00098 return _content->*ptr; 00099 }
bool graph::Edge< EdgeContent >::operator< | ( | const Edge< EdgeContent > & | other | ) | const [inline] |
Comparison operators.
Definition at line 142 of file edge.h.
References graph::Edge< EdgeContent >::_content.
00142 { return _content < other._content; }
bool graph::Edge< EdgeContent >::operator<= | ( | const Edge< EdgeContent > & | other | ) | const [inline] |
Comparison operators.
Definition at line 155 of file edge.h.
References graph::Edge< EdgeContent >::_content.
00155 { return _content <= other._content; }
Edge< EdgeContent > & graph::Edge< EdgeContent >::operator= | ( | const Edge< EdgeContent > & | other | ) | [inline] |
Change the reference help by the object.
Definition at line 243 of file edge.h.
References graph::Edge< EdgeContent >::_content, graph::Edge< EdgeContent >::_source, and graph::Edge< EdgeContent >::_target.
bool graph::Edge< EdgeContent >::operator== | ( | const Edge< EdgeContent > & | other | ) | const [inline] |
Comparison operators.
Definition at line 124 of file edge.h.
References graph::Edge< EdgeContent >::_content.
00124 { return _content == other._content; }
bool graph::Edge< EdgeContent >::operator> | ( | const Edge< EdgeContent > & | other | ) | const [inline] |
Comparison operators.
Definition at line 136 of file edge.h.
References graph::Edge< EdgeContent >::_content.
00136 { return _content > other._content; }
bool graph::Edge< EdgeContent >::operator>= | ( | const Edge< EdgeContent > & | other | ) | const [inline] |
Comparison operators.
Definition at line 149 of file edge.h.
References graph::Edge< EdgeContent >::_content.
00149 { return _content >= other._content; }
bool graph::Edge< EdgeContent >::serialize | ( | storage::VVEStorage & | ) |
Serialization method.
identity_t graph::Edge< EdgeContent >::source | ( | ) | const [inline] |
Returns the identifier of the source of the edge.
Definition at line 173 of file edge.h.
References graph::Edge< EdgeContent >::_source.
Referenced by graph::VVGraph< RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >), graph::_EmptyEdgeContent, false >::source(), and graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::source().
00173 { return _source; }
identity_t graph::Edge< EdgeContent >::target | ( | ) | const [inline] |
Returns the identifier of the target of the edge.
Definition at line 180 of file edge.h.
References graph::Edge< EdgeContent >::_target.
Referenced by graph::VVGraph< RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >), graph::_EmptyEdgeContent, false >::target(), and graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::target().
00180 { return _target; }
EdgeContent* graph::Edge< EdgeContent >::_content [protected] |
Content of the edge.
Definition at line 214 of file edge.h.
Referenced by graph::Edge< EdgeContent >::clear(), graph::Edge< EdgeContent >::isNull(), graph::Edge< EdgeContent >::operator bool(), graph::Edge< EdgeContent >::operator!=(), graph::Edge< EdgeContent >::operator*(), graph::Edge< EdgeContent >::operator->(), graph::Edge< EdgeContent >::operator->*(), graph::Edge< EdgeContent >::operator<(), graph::Edge< EdgeContent >::operator<=(), graph::Edge< EdgeContent >::operator=(), graph::Edge< EdgeContent >::operator==(), graph::Edge< EdgeContent >::operator>(), and graph::Edge< EdgeContent >::operator>=().
identity_t graph::Edge< EdgeContent >::_source [protected] |
Identity of the source of the edge.
Definition at line 206 of file edge.h.
Referenced by graph::Edge< EdgeContent >::clear(), graph::Edge< EdgeContent >::operator=(), and graph::Edge< EdgeContent >::source().
identity_t graph::Edge< EdgeContent >::_target [protected] |
Identity of the target of the edge.
Definition at line 210 of file edge.h.
Referenced by graph::Edge< EdgeContent >::clear(), graph::Edge< EdgeContent >::operator=(), and graph::Edge< EdgeContent >::target().