TDblQueBase Class Reference

#include <e32std.h>

class TDblQueBase
Protected Attributes
TDblQueLink iHead
TInt iOffset
Public Member Functions
IMPORT_C TBoolIsEmpty()
IMPORT_C voidReset()
IMPORT_C voidSetOffset(TInt)
Protected Member Functions
TDblQueBase()
TDblQueBase(TInt)
IMPORT_C voidDoAddFirst(TAny *)
IMPORT_C voidDoAddLast(TAny *)
IMPORT_C voidDoAddPriority(TAny *)
IMPORT_C void__DbgTestEmpty()

Detailed Description

A base class that provides implementation for the doubly 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: TDblQue

Member Attribute Documentation

iHead

TDblQueLink iHead[protected]

The head, or anchor point of the queue.

iOffset

TInt iOffset[protected]

The offset of a component link object within elements that form the list.

Constructor & Destructor Documentation

TDblQueBase ( )

IMPORT_CTDblQueBase()[protected]

Default constructor.

It sets:

1. iHead to point to this object in both the forwards and backwards direction.

2. iOffset to zero.

See also: iHead iOffset

TDblQueBase ( TInt )

IMPORT_CTDblQueBase(TIntaOffset)[protected]

Constructor with specified offset.

It sets:

1. iHead to point to this object in both the forwards and backwards direction.

2. iOffset to the specified value.

See also: iHead iOffset

Parameters
aOffsetThe offset of a link object within an element.
Panic Codes
USER78, if aOffset is not divisible by four

Member Function Documentation

DoAddFirst ( TAny * )

IMPORT_C voidDoAddFirst(TAny *aPtr)[protected]

Implements the insertion of the specified list element at the front of the doubly linked list.

This function is called by TDblQue::AddFirst().

See also: TDblQue::AddFirst

Parameters
aPtrAn untyped pointer to the element to be inserted.

DoAddLast ( TAny * )

IMPORT_C voidDoAddLast(TAny *aPtr)[protected]

Implements the insertion of the specified list element at the back of the doubly linked list.

This function is called by TDblQue::AddLast().

See also: TDblQue::AddLast

Parameters
aPtrAn untyped pointer to the element to be inserted.

DoAddPriority ( TAny * )

IMPORT_C voidDoAddPriority(TAny *aPtr)[protected]

Implements the insertion of the specified list element in priority order.

This function is called by TPriQue::Add().

See also: TPriQue::Add

Parameters
aPtrAn untyped pointer to the element to be inserted.

IsEmpty ( )

IMPORT_C TBoolIsEmpty()const

Tests whether the doubly linked list is empty, i.e. has no list elements.

Return Value
True, if the doubly linked list is empty; false, otherwise.

Reset ( )

IMPORT_C voidReset()

Empties the doubly 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.

SetOffset ( TInt )

IMPORT_C voidSetOffset(TIntaOffset)

Sets the offset of the link object from the start of a doubly linked list element.

See also: TDblQue

Parameters
aOffsetThe offset of the link object from the start of a doubly linked list element.
Panic Codes
USER78, if aOffset is not divisible by four.

__DbgTestEmpty ( )

IMPORT_C void__DbgTestEmpty()const [protected]

Tests whether the queue is empty.

The function is implemented as an __ASSERT_DEBUG.

Panic Codes
USER79, if the assertion fails.