|
||
class TSglQue : public TSglQueBase;
A templated class that provides the behaviour for managing a singly linked list.
It also acts as the head of the list, maintaining the pointers into the list.
The template parameter defines the type of element that forms the singly linked list and is the class that acts as host to the link object.
TSglQueBase
- A base class that provides implementation for the singly linked list header.
TSglQue
- A templated class that provides the behaviour for managing a singly linked list.
Defined in TSglQue
:
AddFirst(T &)
Inserts the specified list element at the front of the singly linked list.AddLast(T &)
Inserts the specified list element at the back of the singly linked list.AddLast(T &)
Elements()const
First()const
Gets a pointer to the first list element in the singly linked list.IsFirst(const T *)const
Tests whether the specified element is the first in the singly linked list.IsLast(const T *)const
Tests whether the specified element is the last in the singly linked list.Last()const
Gets a pointer to the last list element in the singly linked list.Remove(T &)
Removes the specified element from the singly linked list.Remove(T &)
TSglQue()
Constructs an empty list header and sets the offset value of the link object to ...TSglQue(TInt)
Constructs an empty list header and sets the offset of the link object to the sp...TSglQue(TInt)
Inherited from 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(TInt)
iElements
iHead
iLast
iOffset
The offset of a component link object within elements that form the list.TSglQueLink
...inline TSglQue(TInt aOffset);
Constructs an empty list header and sets the offset of the link object to the specified value.
|
|
inline TSglQue();
Constructs an empty list header and sets the offset value of the link object to zero.
In practice, never assume that the offset of the link object from the start of a list element is zero, even if the link object is declared as the first data member in the list element class.
If this default constructor is used, then call the TSglQueBase::SetOffset(TInt)
function of the base class to ensure that the offset value is set correctly.
TSglQueBase::SetOffset(TInt)
Sets the offset of the link object from the start of a singly linked list elemen...inline void AddLast(T &aRef);
Inserts the specified list element at the back of the singly linked list.
If the list is not empty, the specified element becomes the last in the list. What was previously the last element becomes the next to last element in the list.
|
inline void Remove(T &aRef);
Removes the specified element from the singly linked list.
The singly linked list must not be empty.
|
|
inline void AddFirst(T &aRef);
Inserts the specified list element at the front of the singly linked list.
If the list is not empty, the specified element becomes the first in the list. What was previously the first element becomes the second in the list.
|
inline TBool IsFirst(const T *aPtr) const;
Tests whether the specified element is the first in the singly linked list.
|
|
inline TBool IsLast(const T *aPtr) const;
Tests whether the specified element is the last in the singly linked list.
|
|
inline T* First() const;
Gets a pointer to the first list element in the singly linked list.
|
inline T* Last() const;
Gets a pointer to the last list element in the singly linked list.
|
inline void Remove(T &aRef);
|