Class: TTextMatch

Declaration: Formatter.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

TAlternateTextMatch

Purpose:

Provides the abstract protocol for doing text matching for particular ranges of text within the template of a TParameterFormatter. TAlternateTextMatch provides a concrete implementation.

Instantiation:

Abstract class; do not allocate.

Deriving Classes:

Any text match class for use with formatters should derive from this class. Examples of such classes are regular expression text matches or alternate text matches. The system provides the concrete class TAlternateTextMatch. Derived classes must provide the Match function.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TTextMatch::TTextMatch

  1. TTextMatch ()
  2. TTextMatch (const TTextMatch &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTextMatch::~TTextMatch

virtual ~ TTextMatch ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTextMatch::operator=

TTextMatch & operator =(const TTextMatch &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object.

Parameters:

Return Value:

A non-const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTextMatch::operator>>=

virtual TStream & operator >>=(TStream & toWhere) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself out to.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTextMatch::operator<<=

virtual TStream & operator <<= (TStream & fromWhere)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself in from.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTextMatch::Match

virtual bool Match (const TText & targetText, TTextCount & matchLength) const

Interface Category:

API.

Purpose:

To see if there is a match in the given text. Returns true if a match is found.

Calling Context:

This function is called by the Scan member function of the associated formatter.

Parameters:

Return Value:

Returns true if a match is found.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.