Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: s32btree.h
Link against: estor.lib

Class MBtreeKey

MBtreeKey

Support

Supported from 5.0

Description

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

Derived classes implement this interface for particular types of key.

Defined in MBtreeKey:
Between(), Compare(), Key()


Between()

virtual void Between(const TAny* aLeft,const TAny* aRight,TBtreePivot& aPivot) const=0;

Description

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

[Top]


Compare()

virtual TInt Compare(const TAny* aLeft,const TAny* aRight) const=0;

Description

Orders two keys.

Parameters

const TAny* aLeft

Pointer to first key

const TAny* aRight

Pointer to second key

Return value

TInt

Positive, if the first key is after the second key; negative, if the first key is before the second key; zero, if the keys are equal

[Top]


Key()

virtual const TAny* Key(const TAny* anEntry) const;

Description

Gets the key value for an entry.

Parameters

const TAny* anEntry

Object for which to get the key value

Return value

const TAny*

Pointer to the key value