Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Using TDblQueIter<class T>


Constructing the iterator

To create an iterator for a doubly linked list of CAnyClass objects, create a TDblQueIter object:

TDblQueIter<CAnyClass> iIter(queHeader);

The constructor needs a reference to a doubly linked list header whether or not the list has any items in it:

TDblQue<CAnyClass> queHeader(_FOFF(CAnyClass,link));

The CAnyClass class contains a declaration for the link object at a suitable point.

class CAnyClass : CBase
 {
 //... class members
 TDblQueLink link;
 //... class members
 };