Click
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
List< T, member >::const_iterator Class Reference

Const iterator type for List. More...

#include <list.hh>

Inheritance diagram for List< T, member >::const_iterator:
List< T, member >::iterator

Public Types

typedef bool(const_iterator::* unspecified_bool_type) () const
 

Public Member Functions

 const_iterator ()
 Construct an invalid iterator.
 
 const_iterator (const T *x)
 Construct an iterator pointing at x.
 
 const_iterator (const List< T, member > *list)
 Construct an end iterator for list.
 
 const_iterator (const T *x, const List< T, member > *list)
 Construct an iterator pointing at x in list.
 
 operator unspecified_bool_type () const
 Test if this iterator points to a valid list element.
 
bool live () const
 Test if this iterator points to a valid list element.
 
const T * get () const
 Return the current list element or null.
 
const T * operator-> () const
 Return the current list element or null.
 
const T & operator* () const
 Return the current list element.
 
void operator++ ()
 Advance this iterator to the next element.
 
void operator++ (int)
 Advance this iterator to the next element.
 
void operator-- ()
 Advance this iterator to the previous element.
 
void operator-- (int)
 Advance this iterator to the previous element.
 
const_iterator & operator+= (int x)
 Move this iterator forward by x positions.
 
const_iterator & operator-= (int x)
 Move this iterator backward by x positions.
 
const_iterator operator+ (int x) const
 Return an iterator x positions ahead.
 
const_iterator operator- (int x) const
 Return an iterator x positions behind.
 
bool operator== (const_iterator x) const
 Test if this iterator equals x.
 
bool operator!= (const_iterator x) const
 Test if this iterator does not equal x.
 

Detailed Description

template<typename T, List_member< T > T::* member>
class List< T, member >::const_iterator

Const iterator type for List.

Constructor & Destructor Documentation

◆ const_iterator() [1/4]

template<typename T , List_member< T > T::* member>
List< T, member >::const_iterator::const_iterator ( )
inline

Construct an invalid iterator.

◆ const_iterator() [2/4]

template<typename T , List_member< T > T::* member>
List< T, member >::const_iterator::const_iterator ( const T *  x)
inline

Construct an iterator pointing at x.

◆ const_iterator() [3/4]

template<typename T , List_member< T > T::* member>
List< T, member >::const_iterator::const_iterator ( const List< T, member > *  list)
inline

Construct an end iterator for list.

◆ const_iterator() [4/4]

template<typename T , List_member< T > T::* member>
List< T, member >::const_iterator::const_iterator ( const T *  x,
const List< T, member > *  list 
)
inline

Construct an iterator pointing at x in list.

Member Function Documentation

◆ operator unspecified_bool_type()

template<typename T , List_member< T > T::* member>
List< T, member >::const_iterator::operator unspecified_bool_type ( ) const
inline

Test if this iterator points to a valid list element.

◆ live()

template<typename T , List_member< T > T::* member>
bool List< T, member >::const_iterator::live ( ) const
inline

Test if this iterator points to a valid list element.

◆ get()

template<typename T , List_member< T > T::* member>
const T * List< T, member >::const_iterator::get ( ) const
inline

Return the current list element or null.

◆ operator->()

template<typename T , List_member< T > T::* member>
const T * List< T, member >::const_iterator::operator-> ( ) const
inline

Return the current list element or null.

◆ operator*()

template<typename T , List_member< T > T::* member>
const T & List< T, member >::const_iterator::operator* ( ) const
inline

Return the current list element.

◆ operator++() [1/2]

template<typename T , List_member< T > T::* member>
void List< T, member >::const_iterator::operator++ ( )
inline

Advance this iterator to the next element.

◆ operator++() [2/2]

template<typename T , List_member< T > T::* member>
void List< T, member >::const_iterator::operator++ ( int  )
inline

Advance this iterator to the next element.

◆ operator--() [1/2]

template<typename T , List_member< T > T::* member>
void List< T, member >::const_iterator::operator-- ( )
inline

Advance this iterator to the previous element.

◆ operator--() [2/2]

template<typename T , List_member< T > T::* member>
void List< T, member >::const_iterator::operator-- ( int  )
inline

Advance this iterator to the previous element.

◆ operator+=()

template<typename T , List_member< T > T::* member>
const_iterator & List< T, member >::const_iterator::operator+= ( int  x)
inline

Move this iterator forward by x positions.

Returns
reference to this iterator
Note
This function takes O(abs(x)) time.

◆ operator-=()

template<typename T , List_member< T > T::* member>
const_iterator & List< T, member >::const_iterator::operator-= ( int  x)
inline

Move this iterator backward by x positions.

Returns
reference to this iterator
Note
This function takes O(abs(x)) time.

◆ operator+()

template<typename T , List_member< T > T::* member>
const_iterator List< T, member >::const_iterator::operator+ ( int  x) const
inline

Return an iterator x positions ahead.

◆ operator-()

template<typename T , List_member< T > T::* member>
const_iterator List< T, member >::const_iterator::operator- ( int  x) const
inline

Return an iterator x positions behind.

◆ operator==()

template<typename T , List_member< T > T::* member>
bool List< T, member >::const_iterator::operator== ( const_iterator  x) const
inline

Test if this iterator equals x.

◆ operator!=()

template<typename T , List_member< T > T::* member>
bool List< T, member >::const_iterator::operator!= ( const_iterator  x) const
inline

Test if this iterator does not equal x.


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