RIncrMatcherBase Class Reference
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).
Constructor & Destructor Documentation
RIncrMatcherBase()
RIncrMatcherBase
|
(
|
)
|
[protected, inline]
|
~RIncrMatcherBase()
IMPORT_C
|
~RIncrMatcherBase
|
(
|
)
|
[virtual]
|
Virtual destructor, for reimplementation by derived classes.
Member Functions Documentation
AppendChar(TChar)
IMPORT_C void
|
AppendChar
|
(
|
TChar
|
aLetter
|
)
|
|
Appends a character to the end of the match text.
Parameters
TChar
aLetter
|
Character to append
|
DeleteLastChar()
IMPORT_C void
|
DeleteLastChar
|
(
|
)
|
|
Deletes the final character in the match text.
DoFirstMatchingIndex(TInt &, const MDesCArray &, TCompareFunc)
TInt
|
DoFirstMatchingIndex
|
(
|
TInt
&
|
aIndex,
|
|
const MDesCArray &
|
aDesArray,
|
|
TCompareFunc
|
aCompare
|
|
)
|
const [private]
|
DoIsMatch(const TDesC &, TCompareFunc)
DoSetBestMatch(const TDesC &, TCompareFunc)
FirstMatchingIndex(TInt &, const MDesCArray &, TInt)
IMPORT_C
TInt
|
FirstMatchingIndex
|
(
|
TInt
&
|
aResult,
|
|
const MDesCArray &
|
aDesArray,
|
|
TInt
|
aStartIndex = 0
|
|
)
|
const
|
Finds the first match in an array, using a binary comparison.
Parameters
TInt
& aResult
|
On return, index of the first match in aDesArray
|
const MDesCArray & aDesArray
|
Array of descriptors to search
|
TInt
aStartIndex = 0
|
Index of aDesArray at which to begin search
|
FirstMatchingIndexC(TInt &, const MDesCArray &, TInt)
IMPORT_C
TInt
|
FirstMatchingIndexC
|
(
|
TInt
&
|
aResult,
|
|
const MDesCArray &
|
aDesArray,
|
|
TInt
|
aStartIndex = 0
|
|
)
|
const
|
Finds the first match in an array, using locale collation rules.
Parameters
TInt
& aResult
|
On return, index of the first match in aDesArray
|
const MDesCArray & aDesArray
|
Array of descriptors to search
|
TInt
aStartIndex = 0
|
Index of aDesArray at which to begin search
|
FirstMatchingIndexF(TInt &, const MDesCArray &, TInt)
IMPORT_C
TInt
|
FirstMatchingIndexF
|
(
|
TInt
&
|
aResult,
|
|
const MDesCArray &
|
aDesArray,
|
|
TInt
|
aStartIndex = 0
|
|
)
|
const
|
Finds the first match in an array, using locale folding rules.
Parameters
TInt
& aResult
|
On return, index of the first match in aDesArray
|
const MDesCArray & aDesArray
|
Array of descriptors to search
|
TInt
aStartIndex = 0
|
Index of aDesArray at which to begin search
|
IsMatch(const TDesC &)
IMPORT_C
TBool
|
IsMatch
|
(
|
const
TDesC
&
|
aBuf
|
)
|
const
|
Tests for match, using a binary comparison.
Parameters
const
TDesC
& aBuf
|
Text to match
|
IsMatchC(const TDesC &)
IMPORT_C
TBool
|
IsMatchC
|
(
|
const
TDesC
&
|
aBuf
|
)
|
const
|
Tests for match, using locale collation rules.
Parameters
const
TDesC
& aBuf
|
Text to match
|
IsMatchF(const TDesC &)
IMPORT_C
TBool
|
IsMatchF
|
(
|
const
TDesC
&
|
aBuf
|
)
|
const
|
Tests for match, using locale folding rules.
Parameters
const
TDesC
& aBuf
|
Text to match
|
MatchDes()
TDes
&
|
MatchDes
|
(
|
)
|
[protected, pure virtual]
|
MatchDes()
const
TDes
&
|
MatchDes
|
(
|
)
|
const [protected, pure virtual]
|
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 void
|
SetBestMatch
|
(
|
const
TDesC
&
|
aBuf
|
)
|
|
Sets the match text to the best match between the match text and the passed buffer, using a binary comparision.
For example, if the original match text is "goose" and the passed buffer is "gooSE", the match text would be changed to "goo".
Parameters
const
TDesC
& aBuf
|
Text to match
|
SetBestMatchC(const TDesC &)
IMPORT_C void
|
SetBestMatchC
|
(
|
const
TDesC
&
|
aBuf
|
)
|
|
Sets the match text to the best match between the match text and the passed buffer, using locale collation rules.
Parameters
const
TDesC
& aBuf
|
Text to match
|
SetBestMatchF(const TDesC &)
IMPORT_C void
|
SetBestMatchF
|
(
|
const
TDesC
&
|
aBuf
|
)
|
|
Sets the match text to the best match between the match text and the passed buffer, using locale folding rules.
Parameters
const
TDesC
& aBuf
|
Text to match
|
SetMatchText(const TDesC &)
void
|
SetMatchText
|
(
|
const
TDesC
&
|
aText
|
)
|
[inline]
|
Parameters
const
TDesC
& aText
|
String to which to set the match text.
|
Member Type Definitions Documentation
Typedef TCompareFunc
typedef
TInt
(*
|
TCompareFunc
|
[private]
|
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.