MBtreeKey Class Reference

class MBtreeKey

Interface for ordering and creating keys for entries in a B-tree.

Derived classes implement this interface for particular types of key.

Public Member Functions
voidBetween(const TAny *, const TAny *, TBtreePivot &)
TInt Compare(const TAny *, const TAny *)
IMPORT_C const TAny *Key(const TAny *)

Member Functions Documentation

Between(const TAny *, const TAny *, TBtreePivot &)

voidBetween(const TAny *aLeft,
const TAny *aRight,
TBtreePivot &aPivot
)const [pure virtual]

Gets the midpoint between two keys.

The generated midpoint will be greater or equal to aLeft (by a comparison performed by the Compare() function), and less than aRight.

Parameters

const TAny * aLeftFirst key
const TAny * aRightSecond key
TBtreePivot & aPivotOn return, the midpoint between the two keys

Compare(const TAny *, const TAny *)

TInt Compare(const TAny *aLeft,
const TAny *aRight
)const [pure virtual]

Orders two keys.

Parameters

const TAny * aLeftPointer to first key
const TAny * aRightPointer to second key

Key(const TAny *)

IMPORT_C const TAny *Key(const TAny *anEntry)const [virtual]

Gets the key value for an entry.

Parameters

const TAny * anEntryObject for which to get the key value