|
MorphoGraphX
2.0-1-227
|
#include <Vertex.hpp>
Classes | |
| struct | CountedContent |
| Type of the reference counted content. More... | |
Public Types | |
| typedef vertex_identity_t | identity_t |
| Type of the identifier of the vertex. More... | |
| typedef VertexContent | content_t |
| Type of the content of the vertex. More... | |
| typedef VertexContent * | pointer |
| Type of the equivalent pointer. More... | |
Public Member Functions | |
| Vertex () | |
| Creates a new vertex with a new content. More... | |
| Vertex (identity_t id) | |
Creates a reference on the vertex of identifier id. More... | |
| Vertex (const Vertex ©) | |
| Copy a vertex. More... | |
| ~Vertex () | |
| Desctructor. More... | |
| VertexContent * | operator-> () const |
| Access to the data. More... | |
| VertexContent & | operator* () const |
| Access to the data. More... | |
| Vertex & | operator= (const Vertex &other) |
| Change the vertex held by the current object. More... | |
| Vertex & | operator= (const identity_t &id) |
| Vertex & | operator= (const VertexContent *value) |
| bool | operator== (const Vertex &other) const |
| Comparison operators. More... | |
| bool | operator!= (const Vertex &other) const |
| Comparison operators. More... | |
| bool | operator> (const Vertex &other) const |
| Comparison operators. More... | |
| bool | operator< (const Vertex &other) const |
| Comparison operators. More... | |
| bool | operator>= (const Vertex &other) const |
| Comparison operators. More... | |
| bool | operator<= (const Vertex &other) const |
| Comparison operators. More... | |
| bool | isNull () const |
| Test if a vertex is a null vertex. More... | |
| identity_t | id () const |
| Return the identifier of a vertex. More... | |
| size_t | num () const |
| Return a number unique to each vertex, globally. More... | |
| operator bool () const | |
Convert a vertex to true if it is not null. More... | |
| unsigned int | count () const |
Static Public Attributes | |
| static Vertex | null |
Protected Member Functions | |
| void | release () |
| Release the current pointer. More... | |
| void | acquire () |
| Acquire the current pointer. More... | |
Protected Attributes | |
| CountedContent * | content |
| Content of the vertex. More... | |
Vertex of a vv graph.
The vertexes handle their associated data using a reference counting scheme. As such, they can be used as smart pointers. They are also comparable (<,>,==,!=), which allow for use in any sorted structure and hashable for use in any hash table-based structure.
They also all have a unique identifier.
Definition at line 58 of file Vertex.hpp.
| typedef VertexContent mgx::Vertex< VertexContent >::content_t |
Type of the content of the vertex.
Definition at line 98 of file Vertex.hpp.
| typedef vertex_identity_t mgx::Vertex< VertexContent >::identity_t |
Type of the identifier of the vertex.
Definition at line 93 of file Vertex.hpp.
| typedef VertexContent* mgx::Vertex< VertexContent >::pointer |
Type of the equivalent pointer.
Definition at line 103 of file Vertex.hpp.
| mgx::Vertex< VertexContent >::Vertex |
Creates a new vertex with a new content.
Example:
Definition at line 296 of file Vertex.hpp.
|
explicit |
Creates a reference on the vertex of identifier id.
If id is 0, creates a null vertex.
| [in] | id | Label of the vertex to retrieve. |
Example:
Definition at line 302 of file Vertex.hpp.
| mgx::Vertex< VertexContent >::Vertex | ( | const Vertex< VertexContent > & | copy | ) |
| mgx::Vertex< VertexContent >::~Vertex |
Desctructor.
Definition at line 290 of file Vertex.hpp.
|
protected |
Acquire the current pointer.
Definition at line 337 of file Vertex.hpp.
|
inline |
Definition at line 260 of file Vertex.hpp.
|
inline |
Return the identifier of a vertex.
Definition at line 242 of file Vertex.hpp.
|
inline |
Test if a vertex is a null vertex.
Definition at line 235 of file Vertex.hpp.
|
inline |
Return a number unique to each vertex, globally.
Definition at line 249 of file Vertex.hpp.
|
inline |
Convert a vertex to true if it is not null.
Definition at line 256 of file Vertex.hpp.
|
inline |
Comparison operators.
Definition at line 196 of file Vertex.hpp.
|
inline |
Access to the data.
Definition at line 164 of file Vertex.hpp.
|
inline |
Access to the data.
Definition at line 155 of file Vertex.hpp.
|
inline |
Comparison operators.
Definition at line 212 of file Vertex.hpp.
|
inline |
Comparison operators.
Definition at line 228 of file Vertex.hpp.
| Vertex< VertexContent > & mgx::Vertex< VertexContent >::operator= | ( | const identity_t & | id | ) |
Definition at line 316 of file Vertex.hpp.
| Vertex< VertexContent > & mgx::Vertex< VertexContent >::operator= | ( | const Vertex< VertexContent > & | other | ) |
Change the vertex held by the current object.
The data is never modified by this operation. If you wish to copy the data of a vertex v1 into a vertex v2 use:
Definition at line 360 of file Vertex.hpp.
| Vertex< VertexContent > & mgx::Vertex< VertexContent >::operator= | ( | const VertexContent * | value | ) |
Definition at line 327 of file Vertex.hpp.
|
inline |
Comparison operators.
Definition at line 188 of file Vertex.hpp.
|
inline |
Comparison operators.
Definition at line 204 of file Vertex.hpp.
|
inline |
Comparison operators.
Definition at line 220 of file Vertex.hpp.
|
protected |
Release the current pointer.
Definition at line 348 of file Vertex.hpp.
|
mutableprotected |
Content of the vertex.
This member is mutable to allow for modification of constant references. This is useful as no operation on the vertex depend on this.
Definition at line 275 of file Vertex.hpp.
|
static |
Definition at line 258 of file Vertex.hpp.
1.8.17