RIncrMatcherBase Class Reference

class RIncrMatcherBase

Base class for incremental matcher classes.

An incremental matcher compares two text buffers from left-to-right. For example, the match between "garage" and "gander" is "ga".

The class provides the interface for getting and setting the text to be matched against, and for performing match tests. Each type of match test is available in three versions, one using binary comparison, one using locale collation rules (comparison of strings to produce a dictionary-like ('lexicographic') ordering, e.g. ignoring punctuation), and one using locale folding rules (e.g. ignoring case).

"bafl.lib" 5.0

Public Member Functions
~RIncrMatcherBase()
IMPORT_C voidAppendChar(TChar)
voidClear()
IMPORT_C voidDeleteLastChar()
IMPORT_C TIntFirstMatchingIndex(TInt &, const MDesCArray &, TInt)
IMPORT_C TIntFirstMatchingIndexC(TInt &, const MDesCArray &, TInt)
IMPORT_C TIntFirstMatchingIndexF(TInt &, const MDesCArray &, TInt)
IMPORT_C TBoolIsMatch(const TDesC &)
IMPORT_C TBoolIsMatchC(const TDesC &)
IMPORT_C TBoolIsMatchF(const TDesC &)
TInt MatchLength()
TPtrC MatchText()
TInt MaxLength()
IMPORT_C voidSetBestMatch(const TDesC &)
IMPORT_C voidSetBestMatchC(const TDesC &)
IMPORT_C voidSetBestMatchF(const TDesC &)
voidSetMatchText(const TDesC &)
Protected Member Functions
RIncrMatcherBase()
TDes &MatchDes()
const TDes &MatchDes()
Private Member Functions
TInt DoFirstMatchingIndex(TInt &, const MDesCArray &, TCompareFunc)
TBool DoIsMatch(const TDesC &, TCompareFunc)
voidDoSetBestMatch(const TDesC &, TCompareFunc)
Private Member Type Definitions
typedef TInt(* TCompareFunc

Constructor & Destructor Documentation

RIncrMatcherBase()

RIncrMatcherBase()[protected, inline]

Default constructor.

~RIncrMatcherBase()

IMPORT_C~RIncrMatcherBase()[virtual]

Member Functions Documentation

AppendChar(TChar)

IMPORT_C voidAppendChar(TCharaLetter)

Parameters

TChar aLetter

Clear()

voidClear()[inline]

Clears the match text.

DeleteLastChar()

IMPORT_C voidDeleteLastChar()

DoFirstMatchingIndex(TInt &, const MDesCArray &, TCompareFunc)

TInt DoFirstMatchingIndex(TInt &aIndex,
const MDesCArray &aDesArray,
TCompareFuncaCompare
)const [private]

Parameters

TInt & aIndex
const MDesCArray & aDesArray
TCompareFunc aCompare

DoIsMatch(const TDesC &, TCompareFunc)

TBool DoIsMatch(const TDesC &aQuery,
TCompareFuncaCompare
)const [private]

Parameters

const TDesC & aQuery
TCompareFunc aCompare

DoSetBestMatch(const TDesC &, TCompareFunc)

voidDoSetBestMatch(const TDesC &aBuf,
TCompareFuncaCompare
)[private]

Parameters

const TDesC & aBuf
TCompareFunc aCompare

FirstMatchingIndex(TInt &, const MDesCArray &, TInt)

IMPORT_C TIntFirstMatchingIndex(TInt &aResult,
const MDesCArray &aDesArray,
TIntaStartIndex = 0
)const

Parameters

TInt & aResult
const MDesCArray & aDesArray
TInt aStartIndex = 0

FirstMatchingIndexC(TInt &, const MDesCArray &, TInt)

IMPORT_C TIntFirstMatchingIndexC(TInt &aResult,
const MDesCArray &aDesArray,
TIntaStartIndex = 0
)const

Parameters

TInt & aResult
const MDesCArray & aDesArray
TInt aStartIndex = 0

FirstMatchingIndexF(TInt &, const MDesCArray &, TInt)

IMPORT_C TIntFirstMatchingIndexF(TInt &aResult,
const MDesCArray &aDesArray,
TIntaStartIndex = 0
)const

Parameters

TInt & aResult
const MDesCArray & aDesArray
TInt aStartIndex = 0

IsMatch(const TDesC &)

IMPORT_C TBoolIsMatch(const TDesC &aBuf)const

Parameters

const TDesC & aBuf

IsMatchC(const TDesC &)

IMPORT_C TBoolIsMatchC(const TDesC &aBuf)const

Parameters

const TDesC & aBuf

IsMatchF(const TDesC &)

IMPORT_C TBoolIsMatchF(const TDesC &aBuf)const

Parameters

const TDesC & aBuf

MatchDes()

TDes &MatchDes()[protected, pure virtual]

Gets the match text.

Match text

MatchDes()

const TDes &MatchDes()const [protected, pure virtual]

Gets the match text.

Match text

MatchLength()

TInt MatchLength()const [inline]

Gets the current length of the match text buffer.

MatchText()

TPtrC MatchText()const [inline]

Gets the match text as a TPtrC.

MaxLength()

TInt MaxLength()const [inline]

Gets the maximum length of the match text buffer.

SetBestMatch(const TDesC &)

IMPORT_C voidSetBestMatch(const TDesC &aBuf)

Parameters

const TDesC & aBuf

SetBestMatchC(const TDesC &)

IMPORT_C voidSetBestMatchC(const TDesC &aBuf)

Parameters

const TDesC & aBuf

SetBestMatchF(const TDesC &)

IMPORT_C voidSetBestMatchF(const TDesC &aBuf)

Parameters

const TDesC & aBuf

SetMatchText(const TDesC &)

voidSetMatchText(const TDesC &aText)[inline]

Sets the match text.

Parameters

const TDesC & aTextString to which to set the match text.

Member Type Definitions Documentation

Typedef TCompareFunc

typedef TInt(*TCompareFunc[private]