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

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

#include <LQueue.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

 LQueueIterator (LQueue< T > &queue, size_t pos=0)
 Construct an LQueueIterator at position pos. More...
 
 LQueueIterator (LQueue< T > &queue, LQueueNode< T > *pos=0)
 Construct an LQueueIterator at node pos. More...
 
bool operator!= (const LQueueIterator< 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...
 
LQueueIterator< T > & operator++ (void)
 Preincrement operator. More...
 
LQueueIterator< T > operator++ (int)
 Postincrement operator. More...
 
bool operator== (const LQueueIterator< T > &rhs) const
 Equality operator. More...
 

Private Attributes

LQueueNode< T > * pos_
 
LQueue< T > & queue_
 the queue we are dealing with More...
 

Detailed Description

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

Implements a forward iterator for LQueue 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 queue!

Definition at line 19 of file LQueue.h.

Member Typedef Documentation

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

Definition at line 186 of file LQueue.h.

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

Definition at line 182 of file LQueue.h.

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

Definition at line 184 of file LQueue.h.

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

Definition at line 185 of file LQueue.h.

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

Definition at line 183 of file LQueue.h.

Constructor & Destructor Documentation

template<typename T >
madara::utility::LQueueIterator< T >::LQueueIterator ( LQueue< T > &  queue,
size_t  pos = 0 
)

Construct an LQueueIterator at position pos.

Definition at line 510 of file LQueue.cpp.

template<typename T >
madara::utility::LQueueIterator< T >::LQueueIterator ( LQueue< T > &  queue,
LQueueNode< T > *  pos = 0 
)

Construct an LQueueIterator at node pos.

Definition at line 527 of file LQueue.cpp.

Member Function Documentation

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

Nonequality operator.

Definition at line 502 of file LQueue.cpp.

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

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

Definition at line 455 of file LQueue.cpp.

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

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

Definition at line 461 of file LQueue.cpp.

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

Preincrement operator.

Definition at line 468 of file LQueue.cpp.

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

Postincrement operator.

Definition at line 479 of file LQueue.cpp.

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

Equality operator.

Definition at line 492 of file LQueue.cpp.

Member Data Documentation

template<typename T>
LQueueNode<T>* madara::utility::LQueueIterator< T >::pos_
mutableprivate

Definition at line 193 of file LQueue.h.

template<typename T>
LQueue<T>& madara::utility::LQueueIterator< T >::queue_
private

the queue we are dealing with

Definition at line 190 of file LQueue.h.


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