|
Rosetta 3.5
|
Custom Edge list (non-const) iterator class, which can return non-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 | |
| EdgeListIterator () | |
| default constructor, owner and element set to null More... | |
| EdgeListIterator (EdgeList const *owner) | |
| owner constructor More... | |
| EdgeListIterator (EdgeList const *owner, EdgeListElement *element) | |
| owner and element constructor: points at a position in a list More... | |
| EdgeListIterator (EdgeListIterator const &src) | |
| copy constructor More... | |
| ~EdgeListIterator () | |
| non-virtual destructor, does nothing More... | |
| EdgeListIterator const & | operator= (EdgeListIterator const &rhs) |
| assignmnet operator More... | |
| EdgeListIterator const & | operator++ () |
| increment operator. Point this iterator at the next element in the list. More... | |
| EdgeListIterator const & | operator-- () |
| decrement operator. Point this iterator at the previous element in the list. More... | |
| bool | operator== (EdgeListIterator 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 |
| 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. More... | |
| Edge * | operator* () const |
| dereference operator: return the edge pointer pointed to by the list element this iterator is hovering over. This method returns a non-const edge pointer, which defines this class as a non-const iterator. There are no methods, though, to access the list element itself. More... | |
| Edge & | operator-> () const |
| dereference operator: return the edge pointer pointed to by the list element this iterator is hovering over. This method returns a non-const edge pointer, which defines this class as a non-const iterator. There are no methods, though, to access the list element itself. More... | |
| bool | valid () const |
| check that this iterator is valid. Will not guarantee that the iterator points at an element that has not been destroyed. More... | |
Private Attributes | |
| EdgeList const * | owner_ |
| EdgeListElement * | element_ |
Friends | |
| class | EdgeList |
| class | EdgeListConstIterator |
Custom Edge list (non-const) iterator class, which can return non-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 |
|
inline |
|
inline |
|
inline |
|
inline |
|
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.
Definition at line 194 of file Graph.hh.
References operator==().
|
inline |
dereference operator: return the edge pointer pointed to by the list element this iterator is hovering over. This method returns a non-const edge pointer, which defines this class as a non-const iterator. There are no methods, though, to access the list element itself.
Definition at line 201 of file Graph.hh.
References core::graph::EdgeListElement::edge(), element_, and valid().
|
inline |
increment operator. Point this iterator at the next element in the list.
Definition at line 175 of file Graph.hh.
References element_, core::graph::EdgeListElement::next(), and valid().
|
inline |
decrement operator. Point this iterator at the previous element in the list.
Definition at line 180 of file Graph.hh.
References element_, core::graph::EdgeListElement::previous(), and valid().
|
inline |
dereference operator: return the edge pointer pointed to by the list element this iterator is hovering over. This method returns a non-const edge pointer, which defines this class as a non-const iterator. There are no methods, though, to access the list element itself.
Definition at line 206 of file Graph.hh.
References core::graph::EdgeListElement::edge(), 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.
Definition at line 186 of file Graph.hh.
References element_, and owner_.
Referenced by operator!=().
|
inline |
check that this iterator is valid. Will not guarantee that the iterator points at an element that has not been destroyed.
Definition at line 876 of file Graph.hh.
References element_, core::graph::EdgeList::is_end_element(), and owner_.
Referenced by operator*(), operator++(), operator--(), and operator->().
|
friend |
|
private |
Definition at line 217 of file Graph.hh.
Referenced by core::graph::EdgeList::erase(), core::graph::EdgeList::insert(), operator*(), operator++(), operator--(), operator->(), operator=(), operator==(), core::graph::EdgeListConstIterator::operator==(), and valid().
|
private |
Definition at line 216 of file Graph.hh.
Referenced by core::graph::EdgeList::erase(), core::graph::EdgeList::insert(), operator=(), operator==(), core::graph::EdgeListConstIterator::operator==(), and valid().
1.8.4