»
Symbian OS v9.3 »
Symbian OS reference »
C++ component reference »
Messaging MSG_FRAMEWORK »
CMsvFindText
Location:
MSVFTEXT.H
Link against: msgs.lib
Link against: msgs_autoshutdown.lib
class CMsvFindText : public CMsgActive;
Description
A utility class which searches through given plain text or rich text for a specified text string.
The class is an active object and searching can be done synchronously or asynchronously. An instance of this class can be
re-used to perform multiple searches for text.
Derivation
CMsgActive
- No description.
CMsvFindText
- A utility class which searches through given plain text or rich text for a specified text string
Members
Defined in CMsvFindText
:
DoComplete()
, DoRunL()
, FindRichTextL()
, FindRichTextL()
, FindTextL()
, FindTextL()
, FoundText()
, NewL()
, NewLC()
, ~CMsvFindText()
Construction and destruction
static IMPORT_C CMsvFindText *NewLC(TInt aPriority=EPriorityStandard);
Description
Creates a new find text utility object with the specified priority and puts a pointer to the new object onto the cleanup stack.
The function leaves if the object cannot be created.
Parameters
TInt aPriority |
The priority of this active object.
|
|
Return value
static IMPORT_C CMsvFindText *NewL(TInt aPriority=EPriorityStandard);
Description
Creates a new find text utility object with the specified priority.
The function leaves if the object cannot be created.
Parameters
TInt aPriority |
The priority of this active object.
|
|
Return value
IMPORT_C ~CMsvFindText();
Description
Destructor.
Any outstanding search is cancelled.
IMPORT_C void FindTextL(const TDesC &aFind, const TDesC &aSource, TMsvPartList aFlags, TRequestStatus &aStatus);
Description
Performs an asynchronous search for a text string within another text string.
Parameters
const TDesC &aFind |
The text string to search for.
|
const TDesC &aSource |
The plain text to be searched.
|
TMsvPartList aFlags |
A set of flags which modify the way the search works: KMsvFindCaseSensitive means the search is successful only if there is
an exact case match for the text. KMsvFindWholeWord means the search is successful only if the matching text in aSource is
not delimited by alphanumeric characters.
|
TRequestStatus &aStatus |
The request status object, which is set when the search operation is complete. Use FoundText() to return the result of the search.
|
|
IMPORT_C void FindRichTextL(const TDesC &aFind, const CRichText &aSource, TMsvPartList aFlags, TRequestStatus &aStatus);
Description
Searches for a specified text string within the given rich text asynchronously.
Parameters
const TDesC &aFind |
The text string to search for.
|
const CRichText &aSource |
The rich text to be searched.
|
TMsvPartList aFlags |
A set of flags which modify the way the search works: KMsvFindCaseSensitive means the search is successful only if there is
an exact case match for the text. KMsvFindWholeWord means the search is successful only if the matching text in aSource is
not delimited by alphanumeric characters.
|
TRequestStatus &aStatus |
The request status object, which is set when the search operation is complete. Use FoundText() to return the result of the search.
|
|
IMPORT_C TBool FindTextL(const TDesC &aFind, const TDesC &aSource, TMsvPartList aFlags);
Description
Performs a synchronous search for a text string within another text string.
Parameters
const TDesC &aFind |
The text string to search for.
|
const TDesC &aSource |
The plain text to be searched.
|
TMsvPartList aFlags |
A set of flags which modify the way the search works: KMsvFindCaseSensitive means the search is successful only if there is
an exact case match for the text. KMsvFindWholeWord means the search is successful only if the matching text in aSource is
not delimited by alphanumeric characters.
|
|
Return value
TBool
|
ETrue if there is a match, otherwise EFalse.
|
|
IMPORT_C TBool FindRichTextL(const TDesC &aFind, const CRichText &aSource, TMsvPartList aFlags);
Description
Searches for a specified text string within the given rich text synchronously.
Parameters
const TDesC &aFind |
The text string to search for.
|
const CRichText &aSource |
The rich text to be searched.
|
TMsvPartList aFlags |
A set of flags which modify the way the search works: KMsvFindCaseSensitive means the search is successful only if there is
an exact case match for the text. KMsvFindWholeWord means the search is successful only if the matching text in aSource is
not delimited by alphanumeric characters.
|
|
Return value
TBool
|
ETrue if there is a match, otherwise EFalse.
|
|
inline TBool FoundText() const;
Description
Returns the result of the asynchronous search for a matching text string.
Return value
TBool
|
ETrue if there is a match, otherwise EFalse.
|
|
private: virtual void DoComplete(TInt &);
Description
Parameters
private: virtual void DoRunL();
Description