IntrusiveListIter< T, DerivedListNode > Class Template Reference

IntrusiveListIter is the companion iterator for InstrusiveList. More...

#include <IntrusiveList.h>

Inheritance diagram for IntrusiveListIter< T, DerivedListNode >:

RawIntrusiveListIter List of all members.

Public Member Functions

 IntrusiveListIter ()
 Constructs a singular iterator.
 IntrusiveListIter (IntrusiveList< T, DerivedListNode > const &list)
 Constructs an iterator positioned at the front of a given list.
T * operator-> () const
 
Returns:
pointer to current element

 operator T * () const
 
Returns:
pointer to current element

T & operator * () const
 
Returns:
reference to current element

void repositionToFront (IntrusiveList< T, DerivedListNode > const &list)
 Repositions to the front of a given list.
void operator++ ()
 Advances iterator position to next node.

Protected Member Functions

IntrusiveListNodegetCurrent () const
void repositionToFront (RawIntrusiveList const &l)

Protected Attributes

IntrusiveListNodepCurr

Private Types

typedef RawIntrusiveListIter super

Detailed Description

template<class T, class DerivedListNode = IntrusiveListNode>
class IntrusiveListIter< T, DerivedListNode >

IntrusiveListIter is the companion iterator for InstrusiveList.

Definition at line 114 of file IntrusiveList.h.


Member Typedef Documentation

template<class T, class DerivedListNode = IntrusiveListNode>
typedef RawIntrusiveListIter IntrusiveListIter< T, DerivedListNode >::super [private]

Definition at line 116 of file IntrusiveList.h.


Constructor & Destructor Documentation

template<class T, class DerivedListNode = IntrusiveListNode>
IntrusiveListIter< T, DerivedListNode >::IntrusiveListIter (  )  [inline, explicit]

Constructs a singular iterator.

Definition at line 122 of file IntrusiveList.h.

00123     {
00124     }

template<class T, class DerivedListNode = IntrusiveListNode>
IntrusiveListIter< T, DerivedListNode >::IntrusiveListIter ( IntrusiveList< T, DerivedListNode > const &  list  )  [inline, explicit]

Constructs an iterator positioned at the front of a given list.

Parameters:
list the list to access

Definition at line 131 of file IntrusiveList.h.

00133         : super(list)
00134     {
00135     }


Member Function Documentation

template<class T, class DerivedListNode = IntrusiveListNode>
T* IntrusiveListIter< T, DerivedListNode >::operator-> (  )  const [inline]

Returns:
pointer to current element

Definition at line 140 of file IntrusiveList.h.

References RawIntrusiveListIter::getCurrent().

00141     {
00142         return static_cast<T *>(
00143             static_cast<DerivedListNode *>(getCurrent()));
00144     }

template<class T, class DerivedListNode = IntrusiveListNode>
IntrusiveListIter< T, DerivedListNode >::operator T * (  )  const [inline]

Returns:
pointer to current element

Definition at line 149 of file IntrusiveList.h.

References RawIntrusiveListIter::getCurrent().

00150     {
00151         return static_cast<T *>(
00152             static_cast<DerivedListNode *>(getCurrent()));
00153     }

template<class T, class DerivedListNode = IntrusiveListNode>
T& IntrusiveListIter< T, DerivedListNode >::operator * (  )  const [inline]

Returns:
reference to current element

Definition at line 158 of file IntrusiveList.h.

References RawIntrusiveListIter::getCurrent().

00159     {
00160         return *static_cast<T *>(
00161             static_cast<DerivedListNode *>(getCurrent()));
00162     }

template<class T, class DerivedListNode = IntrusiveListNode>
void IntrusiveListIter< T, DerivedListNode >::repositionToFront ( IntrusiveList< T, DerivedListNode > const &  list  )  [inline]

Repositions to the front of a given list.

Parameters:
list the list to access

Definition at line 169 of file IntrusiveList.h.

References RawIntrusiveListIter::repositionToFront().

00171     {
00172         super::repositionToFront(list);
00173     }

IntrusiveListNode* RawIntrusiveListIter::getCurrent (  )  const [inline, protected, inherited]

Definition at line 125 of file RawIntrusiveList.h.

Referenced by IntrusiveListIter< T, DerivedListNode >::operator *(), IntrusiveListIter< T, DerivedListNode >::operator T *(), and IntrusiveListIter< T, DerivedListNode >::operator->().

00126     {
00127         return pCurr;
00128     }

void RawIntrusiveListIter::repositionToFront ( RawIntrusiveList const &  l  )  [inline, protected, inherited]

Definition at line 130 of file RawIntrusiveList.h.

References RawIntrusiveList::pFront.

Referenced by IntrusiveListIter< T, DerivedListNode >::repositionToFront().

00131     {
00132         pCurr = l.pFront;
00133     }

void RawIntrusiveListIter::operator++ (  )  [inline, inherited]

Advances iterator position to next node.

Definition at line 139 of file RawIntrusiveList.h.

References IntrusiveListNode::pNext.

00140     {
00141         if (pCurr) {
00142             pCurr = pCurr->pNext;
00143         }
00144     }


Member Data Documentation

IntrusiveListNode* RawIntrusiveListIter::pCurr [protected, inherited]

Definition at line 113 of file RawIntrusiveList.h.


The documentation for this class was generated from the following file:
Generated on Mon Jun 22 04:00:33 2009 for Fennel by  doxygen 1.5.1