Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: usbcque.h
Link against: euser.lib

This item is not part of the S60 3rd Edition SDK for Symbian OS, Feature Pack 2.

Class TSglQueBase

class TSglQueBase;

Description

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.

Members

Defined in TSglQueBase:
DoAddFirst(), DoAddLast(), DoRemove(), IsEmpty(), Reset(), SetOffset(), TSglQueBase(), TSglQueBase(), iElements, iHead, iHead, iLast, iLast, iOffset

See also:


Construction and destruction


TSglQueBase()

protected: IMPORT_C TSglQueBase();

Description

Default constructor.

It sets:

1. iHead to Null.

2. iLast to point to the head of queue.

3. iOffset to zero.

See also:


TSglQueBase()

protected: IMPORT_C TSglQueBase(TInt aOffset);

Description

Parameters

TInt aOffset

[Top]


Member functions


IsEmpty()

IMPORT_C TBool IsEmpty() const;

Description

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

Return value

TBool

True, if the singly linked list is empty; false, otherwise.


SetOffset()

IMPORT_C void SetOffset(TInt aOffset);

Description

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

Parameters

TInt aOffset

The offset of the link object from the start of a singly linked list element.

Panic codes

USER

75, if aOffset is not divisible by four.

See also:


Reset()

IMPORT_C void Reset();

Description

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.


DoAddFirst()

protected: IMPORT_C void DoAddFirst(TAny *aPtr);

Description

Implements the insertion of a list element at the front of the singly linked list.

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

Parameters

TAny *aPtr

An untyped pointer to the element to be inserted.


DoAddLast()

protected: IMPORT_C void DoAddLast(TAny *aPtr);

Description

Parameters

TAny *aPtr


DoRemove()

protected: IMPORT_C void DoRemove(TAny *aPtr);

Description

Parameters

TAny *aPtr

[Top]


Member data


iHead

protected: TSglQueLink * iHead;

Description


iLast

protected: TSglQueLink * iLast;

Description


iOffset

protected: TInt iOffset;

Description

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


iElements

protected: TInt iElements;

Description


iHead

protected: TSglQueLink * iHead;

Description

A pointer to the first element in the list.


iLast

protected: TSglQueLink * iLast;

Description

A pointer to the last element in the list.