Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Location: e32std.h
Link against: euser.lib

Class TDeltaQueBase

class TDeltaQueBase : public TDblQueBase;

Description

A base class that provides implementation for the TDeltaQue template class.

The class is abstract and is not intended to be instantiated.

Derivation

Members

Defined in TDeltaQueBase:
CountDown(), CountDown(), DoAddDelta(), DoRemove(), DoRemoveFirst(), FirstDelta(), Reset(), TDeltaQueBase(), TDeltaQueBase(), iFirstDelta

Inherited from TDblQueBase:
DoAddFirst(), DoAddLast(), DoAddPriority(), IsEmpty(), SetOffset(), __DbgTestEmpty(), iHead, iOffset

See also:


Construction and destruction


TDeltaQueBase()

protected: IMPORT_C TDeltaQueBase();

Description

Default constructor.

It sets iFirstDelta to NULL.

See also:


TDeltaQueBase()

protected: IMPORT_C TDeltaQueBase(TInt aOffset);

Description

Constructor with specified offset.

It sets:

1. iFirstDelta to NULL

2. TDblQueBase::iOffset to the specified value, through a call to the base class constructor.

Parameters

TInt aOffset

The offset of a link object within an element.

See also:

[Top]


Member functions


CountDown()

IMPORT_C TBool CountDown();

Description

Decrements the delta value of the first element by one, and returns true if the result is negative or zero.

Return value

TBool

True, if the resulting delta value is negative or zero; false, if the value is positive, or there is no first element.


CountDown()

IMPORT_C TBool CountDown(TInt aValue);

Description

Decrements the delta value of the first element by the specified value, and returns true if the result is negative or zero.

Parameters

TInt aValue

The amount by which the delta value is to be reduced.

Return value

TBool

True, if the resulting delta value is negative or zero; false, if the value is positive, or there is no first element.


FirstDelta()

IMPORT_C TBool FirstDelta(TInt &aValue);

Description

Gets the delta value of the first list element.

Parameters

TInt &aValue

On return, contsins the delta value of the first element. Note that this remains unchanged if there is no first element.

Return value

TBool

True, if there is a first element; false, otherwise.


Reset()

IMPORT_C void Reset();

Description

Empties the doubly linked list, and resets the first delta pointer.


DoAddDelta()

protected: IMPORT_C void DoAddDelta(TAny *aPtr, TInt aDelta);

Description

Implements the addition of the specified list element into the list.

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

Parameters

TAny *aPtr

Pointer to the list element to be inserted.

TInt aDelta

The 'distance' from the nominal zero point.


DoRemove()

protected: IMPORT_C void DoRemove(TAny *aPtr);

Description

Implements the removal of the specified list element from the list.

This function is called by TDeltaQue::Remove().

Parameters

TAny *aPtr

Pointer to the list element to be removed.


DoRemoveFirst()

protected: IMPORT_C TAny *DoRemoveFirst();

Description

Implements the removal of the first list element from the linked list if its delta value is zero or negative.

This function is called by TDeltaQue::RemoveFirst().

Return value

TAny *

A pointer to the element removed from the linked list. This is NULL, if the first element has a positive delta value.

[Top]


Member data


iFirstDelta

protected: TInt * iFirstDelta;

Description

Pointer to the delta value in the first link element.