![]() |
Rosetta
2019.07
|
Custom Edge list const iterator class, which returns only const Edge pointers. This iterator cannot be used to change the structure of its list without access to that list directly. Customized since STL's const-iterator cannot be prevented from giving non-const access to its data. The former workaround to this problem was to define two sets of edge lists on each vertex: a list< Edge * > and a list< Edge const * >. More...
#include <Graph.hh>
Public Member Functions | |
EdgeListConstIterator () | |
default constructor, owner and element set to null More... | |
EdgeListConstIterator (EdgeList const *owner) | |
owner constructor More... | |
EdgeListConstIterator (EdgeList const *owner, EdgeListElement const *element) | |
owner and element constructor: points at a position in a list More... | |
EdgeListConstIterator (EdgeListConstIterator const &src)=default | |
copy constructor More... | |
EdgeListConstIterator (EdgeListIterator const &src) | |
const-cast constructor More... | |
~EdgeListConstIterator ()=default | |
non-virtual destructor, does nothing More... | |
EdgeListConstIterator & | operator= (EdgeListConstIterator const &rhs)=default |
assignmnet operator More... | |
EdgeListConstIterator const & | operator++ () |
increment operator. Point this iterator at the next element in the list. More... | |
EdgeListConstIterator const & | operator-- () |
decrement operator. Point this iterator at the previous element in the list. More... | |
bool | operator== (EdgeListConstIterator const &rhs) const |
equality operator. Do these elements point at the same list element? Asserts that they belong to the same list. Never compare elements from separate lists. More... | |
bool | operator== (EdgeListIterator const &rhs) const |
const-cast equality operator. Do these elements point at the same list element? Asserts that they belong to the same list. Never compare elements from separate lists. More... | |
bool | operator!= (EdgeListConstIterator const &rhs) const |
inequality operator. Do these elements point to different elements from the same list? Asserts that they belong to the same list. Never compare elements from separate lists. Elements need not be valid to be compared. More... | |
bool | operator!= (EdgeListIterator const &rhs) const |
const-cast inequality operator. Do these elements point to different elements from the same list? Asserts that they belong to the same list. Never compare elements from separate lists. Elements need not be valid to be compared. More... | |
Edge const * | operator* () const |
dereference operator: return the edge pointer pointed to by the list element this iterator is hovering over. This method returns a const edge pointer, which defines this class as a const iterator. There are no methods, of course, to access the list element itself. More... | |
Edge const & | operator-> () const |
dereference operator: return the edge pointer pointed to by the list element this iterator is hovering over. This method returns a const edge pointer, which defines this class as a const iterator. There are no methods, of course, to access the list element itself. More... | |
bool | valid () const |
Is this a valid iterator? More... | |
Private Attributes | |
EdgeList const * | owner_ |
EdgeListElement const * | element_ |
Friends | |
class | EdgeList |
Custom Edge list const iterator class, which returns only const Edge pointers. This iterator cannot be used to change the structure of its list without access to that list directly. Customized since STL's const-iterator cannot be prevented from giving non-const access to its data. The former workaround to this problem was to define two sets of edge lists on each vertex: a list< Edge * > and a list< Edge const * >.
|
inline |
default constructor, owner and element set to null
|
inline |
owner constructor
|
inline |
owner and element constructor: points at a position in a list
|
default |
copy constructor
|
inline |
const-cast constructor
|
default |
non-virtual destructor, does nothing
|
inline |
inequality operator. Do these elements point to different elements from the same list? Asserts that they belong to the same list. Never compare elements from separate lists. Elements need not be valid to be compared.
References operator==().
|
inline |
const-cast inequality operator. Do these elements point to different elements from the same list? Asserts that they belong to the same list. Never compare elements from separate lists. Elements need not be valid to be compared.
References operator==().
|
inline |
dereference operator: return the edge pointer pointed to by the list element this iterator is hovering over. This method returns a const edge pointer, which defines this class as a const iterator. There are no methods, of course, to access the list element itself.
References utility::graph::EdgeListElement::const_edge(), debug_assert, element_, and valid().
|
inline |
increment operator. Point this iterator at the next element in the list.
References utility::graph::EdgeListElement::const_next(), debug_assert, element_, and valid().
|
inline |
decrement operator. Point this iterator at the previous element in the list.
References utility::graph::EdgeListElement::const_previous(), debug_assert, element_, and valid().
|
inline |
dereference operator: return the edge pointer pointed to by the list element this iterator is hovering over. This method returns a const edge pointer, which defines this class as a const iterator. There are no methods, of course, to access the list element itself.
References utility::graph::EdgeListElement::const_edge(), debug_assert, element_, and valid().
|
default |
assignmnet operator
|
inline |
equality operator. Do these elements point at the same list element? Asserts that they belong to the same list. Never compare elements from separate lists.
References debug_assert, element_, and owner_.
Referenced by operator!=().
|
inline |
const-cast equality operator. Do these elements point at the same list element? Asserts that they belong to the same list. Never compare elements from separate lists.
References debug_assert, utility::graph::EdgeListIterator::element_, element_, utility::graph::EdgeListIterator::owner_, and owner_.
|
inline |
Is this a valid iterator?
References element_, utility::graph::EdgeList::is_end_element(), and owner_.
Referenced by operator*(), operator++(), operator--(), and operator->().
|
friend |
|
private |
Referenced by operator*(), operator++(), operator--(), operator->(), operator==(), and valid().
|
private |
Referenced by operator==(), and valid().