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

#include <T2RedBlackTree.h>

Public Member Functions

TFORCEINLINE Iterator (Node *a_pNode)
 
TFORCEINLINE Iterator Next ()
 
TFORCEINLINE Iterator Prev ()
 
TFORCEINLINE NodeGetNode ()
 
TFORCEINLINE T * GetValue ()
 
TFORCEINLINE TBOOL operator== (const Iterator &other) const
 
TFORCEINLINE T & operator* () const
 
TFORCEINLINE T * operator-> () const
 
TFORCEINLINE operator T* () const
 
TFORCEINLINE Iterator operator++ (TINT)
 
TFORCEINLINE Iteratoroperator++ ()
 
TFORCEINLINE Iterator operator-- (TINT)
 
TFORCEINLINE Iteratoroperator-- ()
 

Friends

class CIterator
 

Detailed Description

template<class T>
class T2RedBlackTree< T >::Iterator

Definition at line 183 of file T2RedBlackTree.h.

Constructor & Destructor Documentation

◆ Iterator()

template<class T>
TFORCEINLINE T2RedBlackTree< T >::Iterator::Iterator ( Node * a_pNode)
inline

Definition at line 186 of file T2RedBlackTree.h.

187 : m_pNode( a_pNode ) {}

Member Function Documentation

◆ GetNode()

template<class T>
TFORCEINLINE Node * T2RedBlackTree< T >::Iterator::GetNode ( )
inline

Definition at line 203 of file T2RedBlackTree.h.

204 {
205 return m_pNode;
206 }

◆ GetValue()

template<class T>
TFORCEINLINE T * T2RedBlackTree< T >::Iterator::GetValue ( )
inline

Definition at line 208 of file T2RedBlackTree.h.

209 {
210 return &m_pNode->m_Value;
211 }

◆ Next()

template<class T>
TFORCEINLINE Iterator T2RedBlackTree< T >::Iterator::Next ( )
inline

Definition at line 189 of file T2RedBlackTree.h.

190 {
191 Iterator next = *this;
192 m_pNode = TSTATICCAST( Node, T2RedBlackTree::GetSuccessorOf( m_pNode ) );
193 return next;
194 }
#define TSTATICCAST(POINTERTYPE, VALUE)
Definition Defines.h:69
TFORCEINLINE Iterator(Node *a_pNode)

◆ operator T*()

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

Definition at line 228 of file T2RedBlackTree.h.

229 {
230 return &m_pNode->m_Value;
231 }

◆ operator*()

template<class T>
TFORCEINLINE T & T2RedBlackTree< T >::Iterator::operator* ( ) const
inline

Definition at line 218 of file T2RedBlackTree.h.

219 {
220 return m_pNode->m_Value;
221 }

◆ operator++() [1/2]

template<class T>
TFORCEINLINE Iterator & T2RedBlackTree< T >::Iterator::operator++ ( )
inline

Definition at line 238 of file T2RedBlackTree.h.

239 {
240 m_pNode = TSTATICCAST( Node, T2RedBlackTree::GetSuccessorOf( m_pNode ) );
241 return *this;
242 }

◆ operator++() [2/2]

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

Definition at line 233 of file T2RedBlackTree.h.

234 {
235 return Next();
236 }
TFORCEINLINE Iterator Next()

◆ operator--() [1/2]

template<class T>
TFORCEINLINE Iterator & T2RedBlackTree< T >::Iterator::operator-- ( )
inline

Definition at line 249 of file T2RedBlackTree.h.

250 {
251 m_pNode = TSTATICCAST( Node, T2RedBlackTree::GetPredecessorOf( m_pNode ) );
252 return *this;
253 }

◆ operator--() [2/2]

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

Definition at line 244 of file T2RedBlackTree.h.

245 {
246 return Prev();
247 }
TFORCEINLINE Iterator Prev()

◆ operator->()

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

Definition at line 223 of file T2RedBlackTree.h.

224 {
225 return &m_pNode->m_Value;
226 }

◆ operator==()

template<class T>
TFORCEINLINE TBOOL T2RedBlackTree< T >::Iterator::operator== ( const Iterator & other) const
inline

Definition at line 213 of file T2RedBlackTree.h.

214 {
215 return m_pNode == other.m_pNode;
216 }

◆ Prev()

template<class T>
TFORCEINLINE Iterator T2RedBlackTree< T >::Iterator::Prev ( )
inline

Definition at line 196 of file T2RedBlackTree.h.

197 {
198 Iterator prev = *this;
199 m_pNode = TSTATICCAST( Node, T2RedBlackTree::GetPredecessorOf( m_pNode ) );
200 return prev;
201 }

Friends And Related Symbol Documentation

◆ CIterator

template<class T>
friend class CIterator
friend

Definition at line 258 of file T2RedBlackTree.h.


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