Weak pointer on a vertex. More...
#include <graph/vertex.h>
Public Types | |
typedef VertexContent | content_t |
Type of the content of the vertex. | |
typedef vertex_identity_t | identity_t |
Type of the identifier of the vertex. | |
typedef VertexContent * | pointer |
Type of the equivalent pointer. | |
typedef Vertex< VERTEX_ARGS > | strong_ref |
Strong reference corresponding to the weak one. | |
Public Member Functions | |
bool | isNull () const |
Test if a vertex is a null vertex. | |
WeakVertex & | operator= (const strong_ref &other) |
WeakVertex & | operator= (const identity_t &id) |
WeakVertex & | operator= (const WeakVertex &other) |
Set the content of the weak reference. | |
WeakVertex (const identity_t &id) | |
Construct a weak reference from an id. | |
WeakVertex (const WeakVertex ©) | |
Copy constructor. | |
WeakVertex (const strong_ref &v) | |
Construct a weak reference from a strong one. | |
WeakVertex () | |
Construct an empty weak vertex. |
Weak pointer on a vertex.
Be careful using this class as there is no garanty the vertex still exists.
Definition at line 503 of file vertex.h.
typedef VertexContent graph::WeakVertex< VertexContent >::content_t |
Type of the content of the vertex.
Reimplemented from graph::Vertex< VERTEX_ARGS >.
typedef vertex_identity_t graph::WeakVertex< VertexContent >::identity_t |
Type of the identifier of the vertex.
Reimplemented from graph::Vertex< VERTEX_ARGS >.
typedef VertexContent* graph::WeakVertex< VertexContent >::pointer |
Type of the equivalent pointer.
Reimplemented from graph::Vertex< VERTEX_ARGS >.
typedef Vertex<VERTEX_ARGS> graph::WeakVertex< VertexContent >::strong_ref |
graph::WeakVertex< VertexContent >::WeakVertex | ( | ) | [inline] |
graph::WeakVertex< VertexContent >::WeakVertex | ( | const strong_ref & | v | ) | [inline] |
Construct a weak reference from a strong one.
Definition at line 541 of file vertex.h.
References graph::Vertex< VertexContent >::_content, and graph::Vertex< VERTEX_ARGS >::_content.
00542 : Vertex<VERTEX_ARGS>(0) 00543 { 00544 this->_content = v._content; 00545 }
graph::WeakVertex< VertexContent >::WeakVertex | ( | const WeakVertex< VertexContent > & | copy | ) | [inline] |
Copy constructor.
Definition at line 550 of file vertex.h.
References graph::Vertex< VertexContent >::_content, and graph::Vertex< VERTEX_ARGS >::_content.
00551 : Vertex<VERTEX_ARGS>(0) 00552 { 00553 this->_content = copy._content; 00554 }
graph::WeakVertex< VertexContent >::WeakVertex | ( | const identity_t & | id | ) | [inline, explicit] |
Construct a weak reference from an id.
Definition at line 566 of file vertex.h.
References graph::Vertex< VERTEX_ARGS >::_content.
bool graph::WeakVertex< VertexContent >::isNull | ( | ) | const [inline] |
Test if a vertex is a null vertex.
Reimplemented from graph::Vertex< VERTEX_ARGS >.
Definition at line 608 of file vertex.h.
References graph::Vertex< VERTEX_ARGS >::_content.
WeakVertex& graph::WeakVertex< VertexContent >::operator= | ( | const WeakVertex< VertexContent > & | other | ) | [inline] |
Set the content of the weak reference.
Definition at line 577 of file vertex.h.
References graph::Vertex< VertexContent >::_content, and graph::Vertex< VERTEX_ARGS >::_content.
00578 { 00579 this->_content = other._content; 00580 return *this; 00581 }