Symbian
 Developer Library

DEVELOPER LIBRARY

[Index] [Glossary] [Previous] [Next]



Location: e32std.h
Link against: euser.lib

Class TDeltaQueBase

TDeltaQueBase

Support

Supported from 5.0

Description

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

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

Derivation

TDblQueBaseA base class that provides implementation for the doubly linked list header
TDeltaQueBaseA base class that provides implementation for the TDeltaQue template class

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

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


Construction


TDeltaQueBase()

protected : TDeltaQueBase();

Description

Default constructor.

It sets iFirstDelta to NULL.


TDeltaQueBase()

protected : TDeltaQueBase(TInt anOffset);

Description

Constructor with specified offset.

It sets:

Parameters

TInt anOffset

The offset of a link object within an element.

[Top]


Member functions


CountDown()

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()

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()

TBool FirstDelta(TInt& aValue);

Description

Gets the delta value of the first list element.

Parameters

TInt& aValue

On return, 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()

void Reset();

Description

Empties the doubly linked list.


DoAddDelta()

protected : 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 : 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 : 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