MADARA  3.1.8
madara::utility::LStackConstIterator< T > Class Template Reference

Implements a forward iterator for LStack type classes. More...

#include <LStack.h>

Public Types

typedef int difference_type
 
typedef ::std::forward_iterator_tag iterator_category
 
typedef T * pointer
 
typedef T & reference
 
typedef T value_type
 

Public Member Functions

 LStackConstIterator (const LStack< T > &stack, size_t pos=0)
 Construct an LStackIterator at position pos. More...
 
 LStackConstIterator (const LStack< T > &stack, LStackNode< T > *pos)
 Construct an LStackIterator at node pos. More...
 
bool operator!= (const LStackConstIterator< T > &lhs) const
 Nonequality operator. More...
 
const T & operator* (void) const
 Dereference operator returns a const reference to the item contained at the current position. More...
 
const LStackConstIterator< T > & operator++ (void) const
 Preincrement operator. More...
 
LStackConstIterator< T > operator++ (int) const
 Postincrement operator. More...
 
bool operator== (const LStackConstIterator< T > &rhs) const
 Equality operator. More...
 

Private Attributes

LStackNode< T > * pos_
 
const LStack< T > & stack_
 the stack we are dealing with More...
 

Detailed Description

template<typename T>
class madara::utility::LStackConstIterator< T >

Implements a forward iterator for LStack type classes.

Note: Having a const ExpressionTreeIterator does not guarantee that the current position that it points to will not change, it only guarantees that you cannot change the underlying stack!

Definition at line 21 of file LStack.h.

Member Typedef Documentation

template<typename T>
typedef int madara::utility::LStackConstIterator< T >::difference_type

Definition at line 229 of file LStack.h.

template<typename T>
typedef ::std::forward_iterator_tag madara::utility::LStackConstIterator< T >::iterator_category

Definition at line 225 of file LStack.h.

template<typename T>
typedef T* madara::utility::LStackConstIterator< T >::pointer

Definition at line 227 of file LStack.h.

template<typename T>
typedef T& madara::utility::LStackConstIterator< T >::reference

Definition at line 228 of file LStack.h.

template<typename T>
typedef T madara::utility::LStackConstIterator< T >::value_type

Definition at line 226 of file LStack.h.

Constructor & Destructor Documentation

template<typename T >
madara::utility::LStackConstIterator< T >::LStackConstIterator ( const LStack< T > &  stack,
size_t  pos = 0 
)

Construct an LStackIterator at position pos.

Definition at line 587 of file LStack.cpp.

template<typename T >
madara::utility::LStackConstIterator< T >::LStackConstIterator ( const LStack< T > &  stack,
LStackNode< T > *  pos 
)

Construct an LStackIterator at node pos.

Definition at line 604 of file LStack.cpp.

Member Function Documentation

template<typename T >
bool madara::utility::LStackConstIterator< T >::operator!= ( const LStackConstIterator< T > &  lhs) const

Nonequality operator.

Definition at line 580 of file LStack.cpp.

template<typename T >
const T & madara::utility::LStackConstIterator< T >::operator* ( void  ) const

Dereference operator returns a const reference to the item contained at the current position.

Definition at line 543 of file LStack.cpp.

template<typename T >
const madara::utility::LStackConstIterator< T > & madara::utility::LStackConstIterator< T >::operator++ ( void  ) const

Preincrement operator.

Definition at line 549 of file LStack.cpp.

template<typename T >
madara::utility::LStackConstIterator< T > madara::utility::LStackConstIterator< T >::operator++ ( int  ) const

Postincrement operator.

Definition at line 558 of file LStack.cpp.

template<typename T >
bool madara::utility::LStackConstIterator< T >::operator== ( const LStackConstIterator< T > &  rhs) const

Equality operator.

Definition at line 572 of file LStack.cpp.

Member Data Documentation

template<typename T>
LStackNode<T>* madara::utility::LStackConstIterator< T >::pos_
mutableprivate

Definition at line 236 of file LStack.h.

template<typename T>
const LStack<T>& madara::utility::LStackConstIterator< T >::stack_
private

the stack we are dealing with

Definition at line 233 of file LStack.h.


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