|
Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
|
A templated class that provides the behaviour for managing a doubly linked list in which elements represent values which are increments, or deltas, on the value represented by a preceding element. More...
#include <e32std.h>
Public Member Functions | |
| TDeltaQue () | |
| Constructs an empty list header and sets the offset value of the link object to zero. | |
| TDeltaQue (TInt aOffset) | |
| Constructs an empty list header and sets the offset of the link object to the specified value. | |
| void | Add (T &aRef, TInt aDelta) |
| Adds the specified list element, having the specified 'distance' from the nominal zero point, into the list. | |
| void | Remove (T &aRef) |
| Removes the specified list element from the linked list. | |
| T * | RemoveFirst () |
| Removes the first list element from the linked list if its delta value is zero or negative. | |
Public Member Functions inherited from TDeltaQueBase | |
| IMPORT_C TBool | CountDown () |
| Decrements the delta value of the first element by one, and returns true if the result is negative or zero. | |
| IMPORT_C TBool | CountDown (TInt aValue) |
| Decrements the delta value of the first element by the specified value, and returns true if the result is negative or zero. | |
| IMPORT_C TBool | FirstDelta (TInt &aValue) |
| Gets the delta value of the first list element. | |
| IMPORT_C void | Reset () |
| Empties the doubly linked list, and resets the first delta pointer. | |
Public Member Functions inherited from TDblQueBase | |
| IMPORT_C TBool | IsEmpty () const |
| Tests whether the doubly linked list is empty, i.e. | |
| IMPORT_C void | SetOffset (TInt aOffset) |
| Sets the offset of the link object from the start of a doubly linked list element. | |
| IMPORT_C void | Reset () |
| Empties the doubly linked list. | |
Additional Inherited Members | |
Protected Member Functions inherited from TDeltaQueBase | |
| IMPORT_C | TDeltaQueBase () |
| Default constructor. | |
| IMPORT_C | TDeltaQueBase (TInt aOffset) |
| Constructor with specified offset. | |
| IMPORT_C void | DoAddDelta (TAny *aPtr, TInt aDelta) |
| Implements the addition of the specified list element into the list. | |
| IMPORT_C void | DoRemove (TAny *aPtr) |
| Implements the removal of the specified list element from the list. | |
| IMPORT_C TAny * | DoRemoveFirst () |
| Implements the removal of the first list element from the linked list if its delta value is zero or negative. | |
Protected Member Functions inherited from TDblQueBase | |
| IMPORT_C | TDblQueBase () |
| Default constructor. | |
| IMPORT_C | TDblQueBase (TInt aOffset) |
| Constructor with specified offset. | |
| IMPORT_C void | DoAddFirst (TAny *aPtr) |
| Implements the insertion of the specified list element at the front of the doubly linked list. | |
| IMPORT_C void | DoAddLast (TAny *aPtr) |
| Implements the insertion of the specified list element at the back of the doubly linked list. | |
| IMPORT_C void | DoAddPriority (TAny *aPtr) |
| Implements the insertion of the specified list element in priority order. | |
| IMPORT_C void | __DbgTestEmpty () const |
| Tests whether the queue is empty. | |
Protected Attributes inherited from TDeltaQueBase | |
| TInt * | iFirstDelta |
| Pointer to the delta value in the first link element. | |
Protected Attributes inherited from TDblQueBase | |
| TDblQueLink | iHead |
| The head, or anchor point of the queue. | |
| TInt | iOffset |
| The offset of a component link object within elements that form the list. | |
A templated class that provides the behaviour for managing a doubly linked list in which elements represent values which are increments, or deltas, on the value represented by a preceding element.
The list is ordered so that the head of the queue represents a nominal zero point.
The delta value of a new element represents its 'distance' from the nominal zero point. The new element is added into the list, and the delta values of adjacent elements (and of the new element, if necessary) are adjusted, so that the sum of all deltas, up to and including the new element, is the same as the new element's intended 'distance' from the nominal zero point.
A common use for a list of this type is as a queue of timed events, where the delta values represent the intervals between the events.
The delta value is defined by the value of the TDeltaQueLink::iDelta member of the link element.
The template parameter defines the type of element that forms the doubly linked list and is the class that acts as host to the link object.
|
inline |
Constructs an empty list header and sets the offset value of the link object to zero.
In practice, never assume that the offset of the link object from the start of a list element is zero, even if the link object is declared as the first data member in the list element class.
If this default constructor is used, then call the TDblQueBase::SetOffset() function in the base class to ensure that the offset value is set correctly.
TDeltaQueBase::iFirstDelta is set to NULL.
(generated from Symbian Developer Library)
|
inlineexplicit |
Constructs an empty list header and sets the offset of the link object to the specified value.
TDeltaQueBase::iFirstDelta is set to NULL.
| aOffset | The offset of the link object from the start of a list element. The macro _FOFF can be used to calculate this value. |
Panic condition: USER 78, if aOffset is not divisible by four.
(generated from Symbian Developer Library)
|
inline |
Adds the specified list element, having the specified 'distance' from the nominal zero point, into the list.
The element is added into the list, the adjacent delta values adjusted, and a suitable delta value assigned to the new element, so that the new element is at the specified 'distance' from the nominal zero point.
| aRef | The list element to be inserted. |
| aDelta | The 'distance' from the nominal zero point. |
(generated from Symbian Developer Library)
|
inline |
Removes the specified list element from the linked list.
The delta value of the element following the removed element is adjusted so that its 'distance' from the nominal zero point remains the same.
| aRef | The list element to be removed. |
(generated from Symbian Developer Library)
|
inline |
Removes the first list element from the linked list if its delta value is zero or negative.
(generated from Symbian Developer Library)