DCL 4.0
Loading...
Searching...
No Matches
LIST_T::Iterator Class Reference

#include <__LIST.h>

Inheritance diagram for LIST_T::Iterator:
ListIteratorBase

Public Member Functions

 Iterator ()
 Iterator (NodeBase *_pNode)
 Iterator (const Iterator &_it)
Iteratoroperator= (const Iterator &_it)
Iteratoroperator++ ()
Iterator operator++ (int)
Iteratoroperator-- ()
Iterator operator-- (int)
ELEMENT_T & operator* ()
Public Member Functions inherited from ListIteratorBase
bool operator== (const ListIteratorBase &x) const
bool operator!= (const ListIteratorBase &x) const

Friends

class LIST_T
class ConstIterator

Additional Inherited Members

Protected Attributes inherited from ListIteratorBase
NodeBase__pNode

Detailed Description

Definition at line 64 of file __LIST.h.

Constructor & Destructor Documentation

◆ Iterator() [1/3]

LIST_T::Iterator::Iterator ( )
inline

Definition at line 183 of file __LIST.h.

184{
185 __pNode = NULL;
186}
#define NULL
Definition Config.h:340
NodeBase * __pNode
Definition ListBase.h:30

◆ Iterator() [2/3]

LIST_T::Iterator::Iterator ( NodeBase * _pNode)
inline

Definition at line 189 of file __LIST.h.

190{
191 __DCL_ASSERT(_pNode != NULL);
192 __pNode = _pNode;
193}
#define __DCL_ASSERT(expr)
Definition Object.h:371

◆ Iterator() [3/3]

LIST_T::Iterator::Iterator ( const Iterator & _it)
inline

Definition at line 196 of file __LIST.h.

197{
198 __DCL_ASSERT(_it.__pNode != NULL);
199 __pNode = _it.__pNode;
200}

Member Function Documentation

◆ operator*()

ELEMENT_T & LIST_T::Iterator::operator* ( )
inline

Definition at line 251 of file __LIST.h.

252{
254 return ((ListNode*)__pNode)->data;
255}

◆ operator++() [1/2]

LIST_T::Iterator & LIST_T::Iterator::operator++ ( )
inline

Definition at line 213 of file __LIST.h.

214{
216 __pNode = __pNode->pNext;
217 return *this;
218}

◆ operator++() [2/2]

LIST_T::Iterator LIST_T::Iterator::operator++ ( int )
inline

Definition at line 222 of file __LIST.h.

223{
225 NodeBase* pSaveNode = __pNode;
226 __pNode = __pNode->pNext;
227 return Iterator(pSaveNode);
228}

◆ operator--() [1/2]

LIST_T::Iterator & LIST_T::Iterator::operator-- ( )
inline

Definition at line 232 of file __LIST.h.

233{
235 __pNode = __pNode->pPrev;
236 return *this;
237}

◆ operator--() [2/2]

LIST_T::Iterator LIST_T::Iterator::operator-- ( int )
inline

Definition at line 241 of file __LIST.h.

242{
244 NodeBase* pSaveNode = __pNode;
245 __pNode = __pNode->pPrev;
246 return Iterator(pSaveNode);
247}

◆ operator=()

LIST_T::Iterator & LIST_T::Iterator::operator= ( const Iterator & _it)
inline

Definition at line 204 of file __LIST.h.

205{
206 __DCL_ASSERT(_it.__pNode != NULL);
207 __pNode = _it.__pNode;
208 return *this;
209}

◆ ConstIterator

friend class ConstIterator
friend

Definition at line 79 of file __LIST.h.

◆ LIST_T

friend class LIST_T
friend

Definition at line 78 of file __LIST.h.


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