|
||
class TDblQueIter : public TDblQueIterBase;
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.
TDblQueIterBase
- A base class that provides implementation for the doubly linked list iterator.
TDblQueIter
- A templated class that provides the behaviour for iterating through a set of dou...
Defined in TDblQueIter
:
Set(T &)
Sets the iterator to point to a specific element in the list.TDblQueIter(TDblQueBase &)
Constructs the iterator for the specified doubly linked listoperator T *()
Gets a pointer to the iterator’s current element.operator++(TInt)
Gets a pointer to the iterator's current element and then sets the iterator to p...operator--(TInt)
Gets a pointer to the iterator's current element and then sets the iterator to p...Inherited from TDblQueIterBase
:
DoCurrent()
Gets the current item in the queue.DoPostDec()
Gets the current item and then moves to the previous item.DoPostInc()
Gets the current item and then moves to the next item.DoSet(TAny *)
Sets the iterator to point to a specific element in the list.SetToFirst()
Sets the iterator to point to the first element in the doubly linked list.SetToLast()
Sets the iterator to point to the last element in the doubly linked list. The fu...TDblQueIterBase(TDblQueBase &)
Constructs the iterator for the specified doubly linked list.iHead
Pointer to the anchor for the list.iNext
Pointer to the current element.iOffset
The offset of a component link object within elements that form the list.inline TDblQueIter(TDblQueBase &aQue);
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 TDblQueIter::operator T *()
, the post increment TDblQueIter::operator++(TInt)
and the post decrement operator --() subsequently return NULL. Once elements have been added to the list, use either the
TDblQueIter::Set(T &)
function, the TDblQueIterBase::SetToFirst()
function or the TDblQueIterBase::SetToLast()
function to set the iterator pointer.
|
TDblQueIter::Set(T &)
Sets the iterator to point to a specific element in the list.TDblQueIterBase::SetToFirst()
Sets the iterator to point to the first element in the doubly linked list.TDblQueIterBase::SetToLast()
Sets the iterator to point to the last element in the doubly linked list. The fu...inline void Set(T &aLink);
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.
|
inline operator T *();
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.
|
inline T* operator++(TInt);
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.
|
|
inline T* operator--(TInt);
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.
|
|