|
||
class TSglQueBase;
A base class that provides implementation for the singly linked list header.
It also encapsulates the offset value of a link object.
The class is abstract and is not intended to be instantiated.
Defined in TSglQueBase
:
DoAddFirst(TAny *)
Implements the insertion of a list element at the front of the singly linked lis...DoAddLast(TAny *)
DoRemove(TAny *)
IsEmpty()const
Tests whether the singly linked list is empty, i.e. has no list elements.Reset()
Empties the singly linked list.SetOffset(TInt)
Sets the offset of the link object from the start of a singly linked list elemen...TSglQueBase()
Default constructor.TSglQueBase(TInt)
iElements
iHead
iHead
A pointer to the first element in the list.iLast
iLast
A pointer to the last element in the list.iOffset
The offset of a component link object within elements that form the list.TSglQue
A templated class that provides the behaviour for managing a singly linked list.protected: IMPORT_C TSglQueBase();
Default constructor.
It sets:
1. iHead to Null.
2. iLast to point to the head of queue.
3. iOffset to zero.
TSglQueBase::iHead
TSglQueBase::iLast
TSglQueBase::iOffset
The offset of a component link object within elements that form the list.IMPORT_C TBool IsEmpty() const;
Tests whether the singly linked list is empty, i.e. has no list elements.
|
IMPORT_C void SetOffset(TInt aOffset);
Sets the offset of the link object from the start of a singly linked list element.
|
|
TSglQue
A templated class that provides the behaviour for managing a singly linked list.IMPORT_C void Reset();
Empties the singly linked list.
After a call to this function, there are no elements queued from the header; the elements are orphaned. Special care must
be taken when list elements are CBase
derived objects, i.e. are allocated on the heap.
protected: IMPORT_C void DoAddFirst(TAny *aPtr);
Implements the insertion of a list element at the front of the singly linked list.
This function is called by TSglQue::AddFirst(T &)
.
|
TSglQue::AddFirst(T &)
Inserts the specified list element at the front of the singly linked list.protected: TInt iOffset;
The offset of a component link object within elements that form the list.
protected: TSglQueLink * iLast;
A pointer to the last element in the list.