Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: MSVFTEXT.H
Link against: msgs.lib
Link against: msgs_autoshutdown.lib

Class CMsvFindText

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

Members

Defined in CMsvFindText:
DoComplete(), DoRunL(), FindRichTextL(), FindRichTextL(), FindTextL(), FindTextL(), FoundText(), NewL(), NewLC(), ~CMsvFindText()


Construction and destruction


NewLC()

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

CMsvFindText *

Pointer to the new find text utility object


NewL()

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

CMsvFindText *

Pointer to the new find text utility object


~CMsvFindText()

IMPORT_C ~CMsvFindText();

Description

Destructor.

Any outstanding search is cancelled.

[Top]


Member functions


FindTextL()

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.


FindRichTextL()

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.


FindTextL()

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.


FindRichTextL()

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.


FoundText()

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.


DoComplete()

private: virtual void DoComplete(TInt &);

Description

Parameters

TInt &


DoRunL()

private: virtual void DoRunL();

Description