Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
TDblQueIter< T > Class Template Reference

A templated class that provides the behaviour for iterating through a set of doubly linked list elements. More...

#include <e32std.h>

Inheritance diagram for TDblQueIter< T >:
TDblQueIterBase

Public Member Functions

 TDblQueIter (TDblQueBase &aQue)
 Constructs the iterator for the specified doubly linked list.
 
void Set (T &aLink)
 Sets the iterator to point to a specific element in the list.
 
 operator T* ()
 Gets a pointer to the iterator s current element.
 
T * operator++ (TInt)
 Gets a pointer to the iterator's current element and then sets the iterator to point to the next element.
 
T * operator-- (TInt)
 Gets a pointer to the iterator's current element and then sets the iterator to point to the previous element.
 
- Public Member Functions inherited from TDblQueIterBase
IMPORT_C void SetToFirst ()
 Sets the iterator to point to the first element in the doubly linked list.
 
IMPORT_C void SetToLast ()
 Sets the iterator to point to the last element in the doubly linked list.
 

Additional Inherited Members

- Protected Member Functions inherited from TDblQueIterBase
IMPORT_C TDblQueIterBase (TDblQueBase &aQue)
 Constructs the iterator for the specified doubly linked list.
 
IMPORT_C TAny * DoPostInc ()
 Gets the current item and then moves to the next item.
 
IMPORT_C TAny * DoPostDec ()
 Gets the current item and then moves to the previous item.
 
IMPORT_C TAny * DoCurrent ()
 Gets the current item in the queue.
 
IMPORT_C void DoSet (TAny *aLink)
 Sets the iterator to point to a specific element in the list.
 
- Protected Attributes inherited from TDblQueIterBase
TInt iOffset
 The offset of a component link object within elements that form the list.
 
TDblQueLinkBase * iHead
 Pointer to the anchor for the list.
 
TDblQueLinkBase * iNext
 Pointer to the current element.
 

Detailed Description

template<class T>
class TDblQueIter< T >

A templated class that provides the behaviour for iterating through a set of doubly linked list elements.

The template parameter defines the type of element that forms the doubly linked list. The class defined in the template parameter contains the link object.

API status
Published to all clients. Released API.

Definition at line 688 of file e32std.h.

Constructor & Destructor Documentation

◆ TDblQueIter()

template<class T >
TDblQueIter< T >::TDblQueIter ( TDblQueBase &  aQue)
inline

Constructs the iterator for the specified doubly linked list.

The iterator can be constructed whether or not the list contains any elements.

If the list does contain elements, the iterator pointer is set to the first one.

If the list has no elements, the iterator pointer is not set and the conversion operator T*(), the post increment operator++() and the post decrement operator –() subsequently return NULL. Once elements have been added to the list, use either the TDblQueIter::Set() function, the TDblQueIterBase::SetToFirst() function or the TDblQueIterBase::SetToLast() function to set the iterator pointer.

TDblQueIter::Set TDblQueIterBase::SetToFirst TDblQueIterBase::SetToLast

Parameters
aQueA reference to a doubly linked list header.

(generated from Symbian Developer Library)

Member Function Documentation

◆ operator T*()

template<class T >
TDblQueIter< T >::operator T* ( )
inline

Gets a pointer to the iterator s current element.

The operator is normally used implicitly; e.g. some member functions of the list header class TDblQue require a pointer to an element (of type class T) as a parameter but in practice, an iterator is often passed instead. This operator performs the necessary conversion.

(generated from Symbian Developer Library)

◆ operator++()

template<class T >
T * TDblQueIter< T >::operator++ ( TInt  )
inline

Gets a pointer to the iterator's current element and then sets the iterator to point to the next element.

Repeated use of this operator allows successive elements to be accessed in the forwards direction.

(generated from Symbian Developer Library)

◆ operator--()

template<class T >
T * TDblQueIter< T >::operator-- ( TInt  )
inline

Gets a pointer to the iterator's current element and then sets the iterator to point to the previous element.

Repeated use of this operator allows successive elements to be accessed in the backwards direction.

(generated from Symbian Developer Library)

◆ Set()

template<class T >
void TDblQueIter< T >::Set ( T &  aLink)
inline

Sets the iterator to point to a specific element in the list.

This function can be used to alter the pointer at any time during the iterator's existence. The referenced element must be in the list, otherwise the result is undefined.

Parameters
aLinkA reference to the element from where iteration is to continue.

(generated from Symbian Developer Library)


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