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
void Between (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 &)

void Between ( 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 * aLeft First key
const TAny * aRight Second key
TBtreePivot & aPivot On 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 * aLeft Pointer to first key
const TAny * aRight Pointer 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 * anEntry Object for which to get the key value