Rosetta  2019.12
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | Friends | List of all members
utility::graph::DirectedEdgeListConstIterator Class Reference

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...
 
DirectedEdgeListConstIteratoroperator= (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
 

Detailed Description

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.

Constructor & Destructor Documentation

utility::graph::DirectedEdgeListConstIterator::DirectedEdgeListConstIterator ( )
inline

default constructor, owner and element set to null

utility::graph::DirectedEdgeListConstIterator::DirectedEdgeListConstIterator ( DirectedEdgeList const *  owner)
inline

owner constructor

utility::graph::DirectedEdgeListConstIterator::DirectedEdgeListConstIterator ( DirectedEdgeList const *  owner,
DirectedEdgeListElement const *  element 
)
inline

owner and element constructor: points at a position in a list

utility::graph::DirectedEdgeListConstIterator::DirectedEdgeListConstIterator ( DirectedEdgeListConstIterator const &  src)
inline

copy constructor

utility::graph::DirectedEdgeListConstIterator::DirectedEdgeListConstIterator ( DirectedEdgeListIterator const &  src)
inline

const-cast constructor

utility::graph::DirectedEdgeListConstIterator::~DirectedEdgeListConstIterator ( )
inline

non-virtual destructor, does nothing

Member Function Documentation

bool utility::graph::DirectedEdgeListConstIterator::operator!= ( DirectedEdgeListConstIterator const &  rhs) const
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==().

bool utility::graph::DirectedEdgeListConstIterator::operator!= ( DirectedEdgeListIterator const &  rhs) const
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==().

DirectedEdge const* utility::graph::DirectedEdgeListConstIterator::operator* ( ) const
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().

DirectedEdgeListConstIterator const& utility::graph::DirectedEdgeListConstIterator::operator++ ( )
inline

increment operator. Point this iterator at the next element in the list.

References utility::graph::DirectedEdgeListElement::const_next(), debug_assert, element_, and valid().

DirectedEdgeListConstIterator const& utility::graph::DirectedEdgeListConstIterator::operator-- ( )
inline

decrement operator. Point this iterator at the previous element in the list.

References utility::graph::DirectedEdgeListElement::const_previous(), debug_assert, element_, and valid().

DirectedEdge const& utility::graph::DirectedEdgeListConstIterator::operator-> ( ) const
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().

DirectedEdgeListConstIterator& utility::graph::DirectedEdgeListConstIterator::operator= ( DirectedEdgeListConstIterator const &  rhs)
inline

assignmnet operator

References element_, and owner_.

bool utility::graph::DirectedEdgeListConstIterator::operator== ( DirectedEdgeListConstIterator const &  rhs) const
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!=().

bool utility::graph::DirectedEdgeListConstIterator::operator== ( DirectedEdgeListIterator const &  rhs) const
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_.

bool utility::graph::DirectedEdgeListConstIterator::valid ( ) const
inline

Is this a valid iterator?

References element_, utility::graph::DirectedEdgeList::is_end_element(), and owner_.

Referenced by operator*(), operator++(), operator--(), and operator->().

Friends And Related Function Documentation

friend class DirectedEdgeList
friend

Member Data Documentation

DirectedEdgeListElement const* utility::graph::DirectedEdgeListConstIterator::element_
private
DirectedEdgeList const* utility::graph::DirectedEdgeListConstIterator::owner_
private

Referenced by operator=(), operator==(), and valid().


The documentation for this class was generated from the following file: