#include <e32std.h>
class TSglQueBase |
Protected Attributes | |
---|---|
TSglQueLink * | iHead |
TSglQueLink * | iLast |
TInt | iOffset |
Public Member Functions | |
---|---|
IMPORT_C TBool | IsEmpty() |
IMPORT_C void | Reset() |
IMPORT_C void | SetOffset(TInt) |
Protected Member Functions | |
---|---|
TSglQueBase() | |
TSglQueBase(TInt) | |
IMPORT_C void | DoAddFirst(TAny *) |
IMPORT_C void | DoAddLast(TAny *) |
IMPORT_C void | DoRemove(TAny *) |
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.
See also: TSglQue
TInt | iOffset | [protected] |
The offset of a component link object within elements that form the list.
IMPORT_C | TSglQueBase | ( | TInt | aOffset | ) | [protected] |
Constructor with specified offset.
It sets:
1. iHead to Null
2. iLast to point to the head of queue.
3. iOffset to the specified value.
Parameters | |
---|---|
aOffset | The offset of a link object within an element. |
Panic Codes | |
---|---|
USER | 75, if aOffset is not divisible by four |
IMPORT_C void | DoAddFirst | ( | TAny * | aPtr | ) | [protected] |
Implements the insertion of a list element at the front of the singly linked list.
This function is called by TSglQue::AddFirst().
See also: TSglQue::AddFirst
Parameters | |
---|---|
aPtr | An untyped pointer to the element to be inserted. |
IMPORT_C void | DoAddLast | ( | TAny * | aPtr | ) | [protected] |
Implements the insertion of a list element at the back of the singly linked list.
This function is called by TSglQue::AddLast().
See also: TSglQue::AddLast
Parameters | |
---|---|
aPtr | An untyped pointer to the element to be inserted. |
IMPORT_C void | DoRemove | ( | TAny * | aPtr | ) | [protected] |
Implements the removal of a list element from the singly linked list.
This function is called by TSglQue::Remove().
See also: TSglQue::Remove
Parameters | |
---|---|
aPtr | An untyped pointer to the element to be removed. |
IMPORT_C TBool | IsEmpty | ( | ) | const |
Tests whether the singly linked list is empty, i.e. has no list elements.
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.