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.
Public Member Functions | |
---|---|
TSglQue () | |
TSglQue ( TInt ) | |
void | AddFirst (T &) |
void | AddLast (T &) |
T * | First () |
TBool | IsFirst (const T *) |
TBool | IsLast (const T *) |
T * | Last () |
void | Remove (T &) |
Inherited Attributes | |
---|---|
TSglQueBase::iHead | |
TSglQueBase::iLast | |
TSglQueBase::iOffset |
TSglQue | ( | ) | [inline] |
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 SetOffset() function of the base class to ensure that the offset value is set correctly.
TSglQue | ( | TInt | aOffset | ) | [inline, explicit] |
Constructs an empty list header and sets the offset of the link object to the specified value.
TInt aOffset | The offset of the link object from the start of a list element. The macro _FOFF can be used to calculate this value. |
void | AddFirst | ( | T & | aRef | ) | [inline] |
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.
T & aRef | The list element to be inserted at the front of the singly linked list. |
void | AddLast | ( | T & | aRef | ) | [inline] |
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.
T & aRef | The list element to be inserted at the back of the singly linked list. |
T * | First | ( | ) | const [inline] |
Gets a pointer to the first list element in the singly linked list.
TBool | IsFirst | ( | const T * | aPtr | ) | const [inline] |
Tests whether the specified element is the first in the singly linked list.
const T * aPtr | A pointer to the element whose position in the list is to be checked. |
TBool | IsLast | ( | const T * | aPtr | ) | const [inline] |
Tests whether the specified element is the last in the singly linked list.
const T * aPtr | A pointer to the element whose position in the list is to be checked. |
T * | Last | ( | ) | const [inline] |
Gets a pointer to the last list element in the singly linked list.
void | Remove | ( | T & | aRef | ) | [inline] |
Removes the specified element from the singly linked list.
The singly linked list must not be empty.
T & aRef | A list element to be removed from the singly linked list. |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.