OpenBarnyard
 
Loading...
Searching...
No Matches
TNodeList< T >::Iterator Class Reference

#include <TNodeList.h>

Public Member Functions

constexpr Iterator ()
 
constexpr Iterator (T *a_pPtr)
 
constexpr Iterator (const Iterator &other)
 
T * Get () const
 
void operator= (const Iterator &other)
 
void operator= (T *pPtr)
 
T * operator-> () const
 
 operator T* () const
 
TBOOL operator== (const Iterator &a_rcIterator) const
 
Iterator operator++ (TINT)
 
Iterator operator-- (TINT)
 
Iterator operator++ ()
 
Iterator operator-- ()
 

Protected Attributes

T * m_pPtr
 

Detailed Description

template<class T>
class TNodeList< T >::Iterator

Definition at line 47 of file TNodeList.h.

Constructor & Destructor Documentation

◆ Iterator() [1/3]

template<class T>
TNodeList< T >::Iterator::Iterator ( )
inlineconstexpr

Definition at line 50 of file TNodeList.h.

51 : m_pPtr( TNULL )
52 {}

◆ Iterator() [2/3]

template<class T>
TNodeList< T >::Iterator::Iterator ( T * a_pPtr)
inlineconstexpr

Definition at line 54 of file TNodeList.h.

55 : m_pPtr( a_pPtr )
56 {}

◆ Iterator() [3/3]

template<class T>
TNodeList< T >::Iterator::Iterator ( const Iterator & other)
inlineconstexpr

Definition at line 58 of file TNodeList.h.

59 : m_pPtr( other.m_pPtr )
60 {}

Member Function Documentation

◆ Get()

template<class T>
T * TNodeList< T >::Iterator::Get ( ) const
inline

Definition at line 62 of file TNodeList.h.

63 {
64 return m_pPtr;
65 }

◆ operator T*()

template<class T>
TNodeList< T >::Iterator::operator T* ( ) const
inline

Definition at line 83 of file TNodeList.h.

84 {
85 TASSERT( m_pPtr != TNULL );
86 return m_pPtr;
87 }
#define TASSERT(X,...)
Definition Defines.h:138

◆ operator++() [1/2]

template<class T>
Iterator TNodeList< T >::Iterator::operator++ ( )
inline

Definition at line 110 of file TNodeList.h.

111 {
112 TASSERT( m_pPtr != TNULL );
113 m_pPtr = m_pPtr->Next();
114 return Iterator{ m_pPtr };
115 }
constexpr Iterator()
Definition TNodeList.h:50

◆ operator++() [2/2]

template<class T>
Iterator TNodeList< T >::Iterator::operator++ ( TINT )
inline

Definition at line 94 of file TNodeList.h.

95 {
96 TASSERT( m_pPtr != TNULL );
98 m_pPtr = m_pPtr->Next();
99 return old;
100 }

◆ operator--() [1/2]

template<class T>
Iterator TNodeList< T >::Iterator::operator-- ( )
inline

Definition at line 117 of file TNodeList.h.

118 {
119 TASSERT( m_pPtr != TNULL );
120 m_pPtr = m_pPtr->Prev();
121 return Iterator{ m_pPtr };
122 }

◆ operator--() [2/2]

template<class T>
Iterator TNodeList< T >::Iterator::operator-- ( TINT )
inline

Definition at line 102 of file TNodeList.h.

103 {
104 TASSERT( m_pPtr != TNULL );
106 m_pPtr = m_pPtr->Prev();
107 return old;
108 }

◆ operator->()

template<class T>
T * TNodeList< T >::Iterator::operator-> ( ) const
inline

Definition at line 77 of file TNodeList.h.

78 {
79 TASSERT( m_pPtr != TNULL );
80 return m_pPtr;
81 }

◆ operator=() [1/2]

template<class T>
void TNodeList< T >::Iterator::operator= ( const Iterator & other)
inline

Definition at line 67 of file TNodeList.h.

68 {
69 m_pPtr = other.m_pPtr;
70 }

◆ operator=() [2/2]

template<class T>
void TNodeList< T >::Iterator::operator= ( T * pPtr)
inline

Definition at line 72 of file TNodeList.h.

73 {
74 m_pPtr = pPtr;
75 }

◆ operator==()

template<class T>
TBOOL TNodeList< T >::Iterator::operator== ( const Iterator & a_rcIterator) const
inline

Definition at line 89 of file TNodeList.h.

90 {
91 return m_pPtr == a_rcIterator.m_pPtr;
92 }

Member Data Documentation

◆ m_pPtr

template<class T>
T* TNodeList< T >::Iterator::m_pPtr
protected

Definition at line 125 of file TNodeList.h.


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