|
DGtal 1.4.2
|
#include <DGtal/graph/ObjectBoostGraphInterface.h>
Public Member Functions | |
| adjacency_iterator () | |
| Default, invalid, constructor. | |
| adjacency_iterator (typename AdjacentVertexContainer::const_iterator it, const DGtal::CountedPtr< AdjacentVertexContainer > &vertices) | |
Private Member Functions | |
| const Vertex & | dereference () const |
| bool | equal (const adjacency_iterator &other) const |
| void | increment () |
| void | decrement () |
Private Attributes | |
| AdjacentVertexContainer::const_iterator | myIterator |
| The iterator pointing in the container of adjacent vertices. | |
| DGtal::CountedPtr< AdjacentVertexContainer > | myVertices |
Friends | |
| class | iterator_core_access |
| Requirement for boost::iterator_facade. | |
Iterator for visiting adjacent vertices. We use an iterator facade to create a STL-compliant iterator with as little effort as possible.
In this case, vp1 and vp2 are not pointing on the same structure, hence the address pointed by vp1 is different from the address pointed by vp2. They are then not comparable a priori. The adjacency_iterator is written so that vp1 (.first or .second) and vp2 (.first or .second) are comparable, using value comparison and out-of-range check.
Definition at line 165 of file ObjectBoostGraphInterface.h.
|
inline |
Default, invalid, constructor.
Definition at line 174 of file ObjectBoostGraphInterface.h.
|
inline |
Valid constructor from instance of AdjacentVertexContainer. The iterator shares the container of adjacent vertices (a std::vector) with other (potentially) iterators, through a DGtal::CountedPtr.
| it | const_iterator of AdjacentVertexContainer. |
| vertices | CountedPtr of an AdjacentVertexContainer |
Definition at line 187 of file ObjectBoostGraphInterface.h.
References boost::vertices().
|
inlineprivate |
Decrement iterator. Required to implement Bidirectional Traversal Iterator Concept.
Definition at line 232 of file ObjectBoostGraphInterface.h.
|
inlineprivate |
Definition at line 197 of file ObjectBoostGraphInterface.h.
|
inlineprivate |
Predicate to compare equal value of iterators. Required to implement Single Pass Iterator Concept.
| other | adjacency_iterator to compare with. |
Definition at line 212 of file ObjectBoostGraphInterface.h.
References myIterator, and myVertices.
|
inlineprivate |
Increment iterator. Required to implement Incrementable Iterator Concept.
Definition at line 225 of file ObjectBoostGraphInterface.h.
|
friend |
Requirement for boost::iterator_facade.
Definition at line 246 of file ObjectBoostGraphInterface.h.
|
private |
The iterator pointing in the container of adjacent vertices.
Definition at line 237 of file ObjectBoostGraphInterface.h.
Referenced by equal().
|
private |
A counted pointer to the dynamically allocated container of vertices. Will be automatically deallocated when there is no more iterators pointing on it.
Definition at line 243 of file ObjectBoostGraphInterface.h.
Referenced by equal().