ThspsDomStringPoolOptimizer Class Reference

class ThspsDomStringPoolOptimizer

Optimizer module for ChspsDomStringPool .

hspsdomdocument.lib
Since
Series 60 5.2

Member Functions Documentation

AddEntryL(ThspsDomStringPoolOptimizerEntry &)

void AddEntryL ( ThspsDomStringPoolOptimizerEntry & aEntry )

Add entry to optimizer list.

Parameters

ThspsDomStringPoolOptimizerEntry & aEntry Entry to be added.

Close()

void Close ( )

Close allocated resources.

Count()

TInt Count ( )

Get item count.

Entry(const TInt)

ThspsDomStringPoolOptimizerEntry & Entry ( const TInt aIndex )

Get entry.

Parameters

const TInt aIndex Index to Entry.

FindEntry(const TDesC8 &, const TInt, const TInt)

TInt FindEntry ( const TDesC8 & aString,
const TInt aLeft,
const TInt aRight
) [private]

Find entry from alphabetic list. Uses binary search.

Parameters

const TDesC8 & aString Reference to string to be searched for.
const TInt aLeft Left limit for binary search
const TInt aRight Right limit for binary search.

FindInsertionIndexEstimate(const TDesC8 &, const TInt, const TInt)

TInt FindInsertionIndexEstimate ( const TDesC8 & aString,
const TInt aLeft,
const TInt aRight
) [private]

Find a position clue for given string.

Will return index that can be used to initiate linear search. Uses binary search to limit required comparisons when string pools starts to fill.

Note: Returned index is not absolute! it must be only used as a start index for linear searching.

Returned index will be quite close to actual insertion position. it will be 0 - 2 steps backward from actual position.

Parameters

const TDesC8 & aString Reference to string.
const TInt aLeft Left limit for binary search
const TInt aRight Right limit for binary search.

GetIndex(const TDesC8 &)

TInt GetIndex ( const TDesC8 & aString )

Get index for string.

Parameters

const TDesC8 & aString Reference to given string.

Reset()

void Reset ( )

Reset.

Member Data Documentation

RArray< ThspsDomStringPoolOptimizerEntry > iEntries

RArray < ThspsDomStringPoolOptimizerEntry > iEntries [private]

Array of optimizer entries.