RHashTableBase Class Reference

class RHashTableBase

Base class used in the derivation of RHashSet<T>, RPtrHashSet<T>, RHashMap<K,V> and RPtrHashMap<K,V>.

This class provides a general hash table implementation using probe sequences generated by pseudo-double hashing. The class is internal and is not intended for use.

Protected Member Functions
RHashTableBase(TGeneralHashFunction32, TGeneralIdentityRelation, TInt, TInt)
IMPORT_C voidClose()
IMPORT_C voidConsistencyCheck(TUint32 *, TUint32 *, TUint32, TUint32 *)
IMPORT_C TIntCount()
IMPORT_C TAny *Find(const TAny *, TInt)
IMPORT_C TAny *FindL(const TAny *, TInt)
TInt Insert(const TAny *, TAny *&)
IMPORT_C TIntPtrInsert(const TAny *, const TAny *)
IMPORT_C voidPtrInsertL(const TAny *, const TAny *)
IMPORT_C TIntRemove(const TAny *)
IMPORT_C TIntReserve(TInt)
IMPORT_C voidReserveL(TInt)
IMPORT_C TIntValueInsert(const TAny *, TInt, const TAny *, TInt, TInt)
IMPORT_C voidValueInsertL(const TAny *, TInt, const TAny *, TInt, TInt)
Private Member Functions
SElement *Element(TInt)
const SElement *ElementC(TInt)
TInt ExpandTable(TInt)
TAny *GetKey(const SElement *)
voidReformTable(TUint)
voidSetThresholds()
voidShrinkTable()
voidVerifyReform()
Public Member Enumerations
enumTDefaultSpecifier { EDefaultSpecifier_Normal }
Protected Member Enumerations
enumTElementState {
EEmpty = 0, EDeleted = 1, EGen0 = 2, EGen1 = 3, EStateMask = 3, EOccupiedMask = 2
}
Private Attributes
TUint32 iCleanThreshold
TUint32 iCount
TInt iElementSize
TAny *iElements
TUint32 iEmptyCount
TUint8 iGeneration
TGeneralHashFunction32 iHashFunc
TGeneralIdentityRelation iIdFunc
TUint8 iIndexBits
TUint8 iKeyOffset
TUint32 iLowerThreshold
TUint8 iPad0
TInt iPad1
TInt iPad2
TUint32 iUpperThreshold

Constructor & Destructor Documentation

RHashTableBase(TGeneralHashFunction32, TGeneralIdentityRelation, TInt, TInt)

IMPORT_CRHashTableBase(TGeneralHashFunction32,
TGeneralIdentityRelation,
TIntaElementSize,
TIntaKeyOffset
)[protected]

Parameters

TGeneralHashFunction32
TGeneralIdentityRelation
TInt aElementSize
TInt aKeyOffset

Member Functions Documentation

Close()

IMPORT_C voidClose()[protected]

ConsistencyCheck(TUint32 *, TUint32 *, TUint32, TUint32 *)

IMPORT_C voidConsistencyCheck(TUint32 *aDeleted = 0,
TUint32 *aComparisons = 0,
TUint32aChainLimit = 0,
TUint32 *aChainInfo = 0
)[protected]

Parameters

TUint32 * aDeleted = 0
TUint32 * aComparisons = 0
TUint32 aChainLimit = 0
TUint32 * aChainInfo = 0

Count()

IMPORT_C TIntCount()const [protected]

Element(TInt)

SElement *Element(TIntaIndex)[private, inline]

Parameters

TInt aIndex

ElementC(TInt)

const SElement *ElementC(TIntaIndex)const [private, inline]

Parameters

TInt aIndex

ExpandTable(TInt)

TInt ExpandTable(TIntaNewIndexBits)[private]

Parameters

TInt aNewIndexBits

Find(const TAny *, TInt)

IMPORT_C TAny *Find(const TAny *aKey,
TIntaOffset = 0
)const [protected]

Parameters

const TAny * aKey
TInt aOffset = 0

FindL(const TAny *, TInt)

IMPORT_C TAny *FindL(const TAny *aKey,
TIntaOffset = 0
)const [protected]

Parameters

const TAny * aKey
TInt aOffset = 0

GetKey(const SElement *)

TAny *GetKey(const SElement *aElement)const [private, inline]

Parameters

const SElement * aElement

Insert(const TAny *, TAny *&)

TInt Insert(const TAny *aKey,
TAny *&aElement
)[protected]

Parameters

const TAny * aKey
TAny *& aElement

PtrInsert(const TAny *, const TAny *)

IMPORT_C TIntPtrInsert(const TAny *aKey,
const TAny *aValue
)[protected]

Parameters

const TAny * aKey
const TAny * aValue

PtrInsertL(const TAny *, const TAny *)

IMPORT_C voidPtrInsertL(const TAny *aKey,
const TAny *aValue
)[protected]

Parameters

const TAny * aKey
const TAny * aValue

ReformTable(TUint)

voidReformTable(TUintaNewIndexBits)[private]

Parameters

TUint aNewIndexBits

Remove(const TAny *)

IMPORT_C TIntRemove(const TAny *aKey)[protected]

Parameters

const TAny * aKey

Reserve(TInt)

IMPORT_C TIntReserve(TIntaCount)[protected]

Parameters

TInt aCount

ReserveL(TInt)

IMPORT_C voidReserveL(TIntaCount)[protected]

Parameters

TInt aCount

SetThresholds()

voidSetThresholds()[private]

ShrinkTable()

voidShrinkTable()[private]

ValueInsert(const TAny *, TInt, const TAny *, TInt, TInt)

IMPORT_C TIntValueInsert(const TAny *aKey,
TIntaKeySize,
const TAny *aValue,
TIntaValueOffset,
TIntaValueSize
)[protected]

Parameters

const TAny * aKey
TInt aKeySize
const TAny * aValue
TInt aValueOffset
TInt aValueSize

ValueInsertL(const TAny *, TInt, const TAny *, TInt, TInt)

IMPORT_C voidValueInsertL(const TAny *aKey,
TIntaKeySize,
const TAny *aValue,
TIntaValueOffset,
TIntaValueSize
)[protected]

Parameters

const TAny * aKey
TInt aKeySize
const TAny * aValue
TInt aValueOffset
TInt aValueSize

VerifyReform()

voidVerifyReform()[private]

Member Enumerations Documentation

Enum TDefaultSpecifier

Enumerators

EDefaultSpecifier_Normal

Enum TElementState

Enumerators

EEmpty = 0
EDeleted = 1
EGen0 = 2
EGen1 = 3
EStateMask = 3
EOccupiedMask = 2

Member Data Documentation

TUint32 iCleanThreshold

TUint32 iCleanThreshold[private]

TUint32 iCount

TUint32 iCount[private]

TInt iElementSize

TInt iElementSize[private]

TAny * iElements

TAny *iElements[private]

TUint32 iEmptyCount

TUint32 iEmptyCount[private]

TUint8 iGeneration

TUint8 iGeneration[private]

TGeneralHashFunction32 iHashFunc

TGeneralHashFunction32 iHashFunc[private]

TGeneralIdentityRelation iIdFunc

TGeneralIdentityRelation iIdFunc[private]

TUint8 iIndexBits

TUint8 iIndexBits[private]

TUint8 iKeyOffset

TUint8 iKeyOffset[private]

TUint32 iLowerThreshold

TUint32 iLowerThreshold[private]

TUint8 iPad0

TUint8 iPad0[private]

TInt iPad1

TInt iPad1[private]

TInt iPad2

TInt iPad2[private]

TUint32 iUpperThreshold

TUint32 iUpperThreshold[private]