Rosetta
2019.07
|
Custom DirectedEdge list const iterator class, which returns only const DirectedEdge 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. More...
#include <Digraph.hh>
Public Member Functions | |
DirectedEdgeListConstIterator () | |
default constructor, owner and element set to null More... | |
DirectedEdgeListConstIterator (DirectedEdgeList const *owner) | |
owner constructor More... | |
DirectedEdgeListConstIterator (DirectedEdgeList const *owner, DirectedEdgeListElement const *element) | |
owner and element constructor: points at a position in a list More... | |
DirectedEdgeListConstIterator (DirectedEdgeListConstIterator const &src) | |
copy constructor More... | |
DirectedEdgeListConstIterator (DirectedEdgeListIterator const &src) | |
const-cast constructor More... | |
~DirectedEdgeListConstIterator () | |
non-virtual destructor, does nothing More... | |
DirectedEdgeListConstIterator & | operator= (DirectedEdgeListConstIterator const &rhs) |
assignmnet operator More... | |
DirectedEdgeListConstIterator const & | operator++ () |
increment operator. Point this iterator at the next element in the list. More... | |
DirectedEdgeListConstIterator const & | operator-- () |
decrement operator. Point this iterator at the previous element in the list. More... | |
bool | operator== (DirectedEdgeListConstIterator 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== (DirectedEdgeListIterator 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!= (DirectedEdgeListConstIterator 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!= (DirectedEdgeListIterator 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... | |
DirectedEdge 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... | |
DirectedEdge 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 | |
DirectedEdgeList const * | owner_ |
DirectedEdgeListElement const * | element_ |
Friends | |
class | DirectedEdgeList |
Custom DirectedEdge list const iterator class, which returns only const DirectedEdge 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.
|
inline |
default constructor, owner and element set to null
|
inline |
owner constructor
|
inline |
owner and element constructor: points at a position in a list
|
inline |
copy constructor
|
inline |
const-cast constructor
|
inline |
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::DirectedEdgeListElement::const_edge(), debug_assert, element_, and valid().
|
inline |
increment operator. Point this iterator at the next element in the list.
References utility::graph::DirectedEdgeListElement::const_next(), debug_assert, element_, and valid().
|
inline |
decrement operator. Point this iterator at the previous element in the list.
References utility::graph::DirectedEdgeListElement::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::DirectedEdgeListElement::const_edge(), debug_assert, element_, and valid().
|
inline |
|
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::DirectedEdgeListIterator::element_, element_, utility::graph::DirectedEdgeListIterator::owner_, and owner_.
|
inline |
Is this a valid iterator?
References element_, utility::graph::DirectedEdgeList::is_end_element(), and owner_.
Referenced by operator*(), operator++(), operator--(), and operator->().
|
friend |
|
private |
Referenced by operator*(), operator++(), operator--(), operator->(), operator=(), operator==(), and valid().
|
private |
Referenced by operator=(), operator==(), and valid().