MADARA  3.1.8
madara::utility::LStackIterator< 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

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

Private Attributes

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

Detailed Description

template<typename T>
class madara::utility::LStackIterator< 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 18 of file LStack.h.

Member Typedef Documentation

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

Definition at line 178 of file LStack.h.

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

Definition at line 174 of file LStack.h.

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

Definition at line 176 of file LStack.h.

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

Definition at line 177 of file LStack.h.

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

Definition at line 175 of file LStack.h.

Constructor & Destructor Documentation

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

Construct an LStackIterator at position pos.

Definition at line 518 of file LStack.cpp.

template<typename T >
madara::utility::LStackIterator< T >::LStackIterator ( LStack< T > &  stack,
LStackNode< T > *  pos = 0 
)

Construct an LStackIterator at node pos.

Definition at line 535 of file LStack.cpp.

Member Function Documentation

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

Nonequality operator.

Definition at line 510 of file LStack.cpp.

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

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

Definition at line 465 of file LStack.cpp.

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

Returns a const reference to the item contained at the current position.

Definition at line 471 of file LStack.cpp.

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

Preincrement operator.

Definition at line 477 of file LStack.cpp.

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

Postincrement operator.

Definition at line 487 of file LStack.cpp.

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

Equality operator.

Definition at line 500 of file LStack.cpp.

Member Data Documentation

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

Definition at line 185 of file LStack.h.

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

the stack we are dealing with

Definition at line 182 of file LStack.h.


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