RHexTreeBase Class Reference

class RHexTreeBase

Base class that provides the implementation for RHexTree , which is just a thin template.

An instance of this class can have up to eight 16-way prefix trees, with heights from 1 to 8. All the values are stored in the leaves. To find a value from a 32-bit key, first the key is decomposed into 8 hexadecimal digits and then the prefix tree with height matching the number of digits in the key (ignoring zeros to the left) is traversed using the sequence of digits in the key as the indexing string. Offsets are internally used instead of pointers to allow instances to be placed in a heap shared between several processes.

Constructor & Destructor Documentation

RHexTreeBase(RHeap *)

IMPORT_C RHexTreeBase ( RHeap * aHeap ) [protected]

Parameters

RHeap * aHeap

Member Functions Documentation

At(TUint)

IMPORT_C TAny * At ( TUint aKey ) const [protected]

Parameters

TUint aKey

At(TUint, TInt)

TAny * At ( TUint aKey,
TInt aHeight
) const [private]

Parameters

TUint aKey
TInt aHeight

ResetAndDestroy()

IMPORT_C void ResetAndDestroy ( )

Empties this associative array and frees all memory allocated both for the associative array implementation and for the values that have been added to this associative array.

The internal state of this associative array is reset so that it can be reused or allowed to go out of scope after a call to this function.

ResetAndDestroy(TInt, TAny *, TInt)

void ResetAndDestroy ( TInt aHeight,
TAny * aNode,
TInt aLevel
) [private]

Parameters

TInt aHeight
TAny * aNode
TInt aLevel

SetAt(TUint, TAny *)

IMPORT_C TInt SetAt ( TUint aKey,
TAny * aValue
) [protected]

Parameters

TUint aKey
TAny * aValue

SetAt(TUint, TAny *, TInt)

TInt SetAt ( TUint aKey,
TAny * aLeaf,
TInt aHeight
) [private]

Parameters

TUint aKey
TAny * aLeaf
TInt aHeight

SetAt(TUint, TAny *, TInt, TAny *, TInt)

TInt SetAt ( TUint aKey,
TAny * aLeaf,
TInt aHeight,
TAny * aNode,
TInt aLevel
) [private]

Parameters

TUint aKey
TAny * aLeaf
TInt aHeight
TAny * aNode
TInt aLevel

Member Data Documentation

RHeap * iHeap

RHeap * iHeap [private]

TInt iRootOffsets

TInt iRootOffsets [private]