#include <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 speci...
Members
Defined in CMsvFindText
:
DoComplete(TInt &)
DoRunL()
FindRichTextL(const TDesC &,const CRichText &,TMsvPartList)
Searches for a specified text string within the given rich text synchronously.
FindRichTextL(const TDesC &,const CRichText &,TMsvPartList,TRequestStatus &)
Searches for a specified text string within the given rich text asynchronously.
FindTextL(const TDesC &,const TDesC &,TMsvPartList)
Performs a synchronous search for a text string within another text string.
FindTextL(const TDesC &,const TDesC &,TMsvPartList,TRequestStatus &)
Performs an asynchronous search for a text string within another text string.
FoundText()const
Returns the result of the asynchronous search for a matching text string.
NewL(TInt)
Creates a new find text utility object with the specified priority.
NewLC(TInt)
Creates a new find text utility object with the specified priority and puts a po...
~CMsvFindText()
Destructor.
Construction and destruction
IMPORT_C static 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
IMPORT_C static 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.
FindTextL(const TDesC &,const TDesC &,TMsvPartList,TRequestStatus &)
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 TDesC16 &aFind |
The text string to search for.
|
const TDesC16 &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 CMsvFindText::FoundText()const to return the result of the search.
|
|
FindRichTextL(const TDesC &,const CRichText &,TMsvPartList,TRequestStatus &)
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 TDesC16 &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 CMsvFindText::FoundText()const to return the result of the search.
|
|
FindTextL(const TDesC &,const TDesC &,TMsvPartList)
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 TDesC16 &aFind |
The text string to search for.
|
const TDesC16 &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.
|
|
FindRichTextL(const TDesC &,const CRichText &,TMsvPartList)
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 TDesC16 &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