ReactOS 0.4.15-dev-7712-gbbbcd8e
CListIterator< Item > Class Template Reference

#include <list.h>

Inheritance diagram for CListIterator< Item >:
Collaboration diagram for CListIterator< Item >:

Public Member Functions

 CListIterator (const CList< Item > *list)
 
virtual VOID First ()
 
virtual VOID Next ()
 
virtual BOOL IsDone () const
 
virtual Item CurrentItem () const
 
- Public Member Functions inherited from CIterator< Item >
virtual ~CIterator ()
 
virtual VOID First ()=0
 
virtual VOID Next ()=0
 
virtual BOOL IsDone () const =0
 
virtual Item CurrentItem () const =0
 

Private Attributes

const CList< Item > * List
 
CListNodeCurrent
 

Detailed Description

template<class Item>
class CListIterator< Item >

Definition at line 57 of file list.h.

Constructor & Destructor Documentation

◆ CListIterator()

template<class Item >
CListIterator< Item >::CListIterator ( const CList< Item > *  list)

Definition at line 199 of file list.h.

199 : List(list)
200{
201 First();
202}
virtual VOID First()
Definition: list.h:206
const CList< Item > * List
Definition: list.h:65
Definition: list.h:37

Member Function Documentation

◆ CurrentItem()

template<class Item >
Item CListIterator< Item >::CurrentItem
virtual

Implements CIterator< Item >.

Definition at line 228 of file list.h.

229{
230 return IsDone()? NULL : (Item) Current->GetElement();
231}
CListNode * Current
Definition: list.h:66
virtual BOOL IsDone() const
Definition: list.h:221
PVOID GetElement()
Definition: list.cpp:79
#define NULL
Definition: types.h:112
_In_ WDFCOLLECTION _In_ WDFOBJECT Item

◆ First()

template<class Item >
VOID CListIterator< Item >::First
virtual

Implements CIterator< Item >.

Definition at line 206 of file list.h.

207{
208 Current = List->GetHeader()->GetNext();
209}
CListNode * GetNext()
Definition: list.cpp:85
_Must_inspect_result_ _In_ WDFCMRESLIST List
Definition: wdfresource.h:550

Referenced by CListIterator< Item >::CListIterator().

◆ IsDone()

template<class Item >
BOOL CListIterator< Item >::IsDone
virtual

Implements CIterator< Item >.

Definition at line 221 of file list.h.

222{
223 return (Current == List->GetTrailer());
224}

◆ Next()

template<class Item >
VOID CListIterator< Item >::Next
virtual

Implements CIterator< Item >.

Definition at line 213 of file list.h.

214{
215 if (!IsDone())
217}

Member Data Documentation

◆ Current

template<class Item >
CListNode* CListIterator< Item >::Current
private

Definition at line 66 of file list.h.

◆ List

template<class Item >
const CList<Item>* CListIterator< Item >::List
private

Definition at line 65 of file list.h.


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