RHexTree Class Reference

class RHexTree : public RHexTreeBase

An associative array implementation optimised for the case where the keys are 32-bit codes with spatial locality of reference. The values can be of any self-contained data type (that is, without destructor or clean-up functions). It allows multiple-readers, single-writer concurrent access from different processes in an SMP-safe manner without locking, excluding deletion of individual key-value pairs.

Inherits from

Constructor & Destructor Documentation

RHexTree(RHeap *)

RHexTree ( RHeap * aHeap ) [inline]

Constructor. It constructs an associative array with no key-value pairs.

Parameters

RHeap * aHeap A pointer to the heap to be used by the associative array implementation to allocate memory for internal data structures. This heap can be shared between several processes.

Member Functions Documentation

At(TUint)

const T * At ( TUint aKey ) const [inline]

Looks up a given key in this associative array and returns a pointer to the corresponding value.

Parameters

TUint aKey The 32-bit key to look up.

At(TUint)

T * At ( TUint aKey ) [inline]

Looks up a given key in this associative array and returns a pointer to the corresponding value. Note that if values are modified after being added to an associative array, then the user is responsible for synchronisation when concurrent access is needed.

Parameters

TUint aKey The 32-bit key to look up.

SetAt(TUint, T *)

TInt SetAt ( TUint aKey,
T * aValue
) [inline]

Adds a key-value pair to this associative array.

Parameters

TUint aKey The 32-bit key to add to this associative array.
T * aValue A pointer to the value to associate with aKey. It must have been allocated on the same heap as the one used by the associative array implementation to allocate memory for internal data structures. Ownership is transferred to this associative array.