Class: TBitwiseTextOrder

Declaration: TextComparison.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TTextOrder

Inherited By:

None.

Purpose:

TBitwiseTextOrder is a concrete class derived from TTextOrder. It provides the protocol for language-insensitive comparison of text strings. The comparison functions in this class perform a bitwise comparison of the Unicode values in the text strings.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

This class is designed to be used directly.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TBitwiseTextOrder::TBitwiseTextOrder

  1. TBitwiseTextOrder ()
  2. TBitwiseTextOrder (const TBitwiseTextOrder & order)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators and by clients.
  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: TBitwiseTextOrder::~TBitwiseTextOrder

virtual ~ TBitwiseTextOrder ()

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: TBitwiseTextOrder::Compare

  1. virtual ETextComparisonResult Compare (const TText & sourceText, const TText & targetText) const
  2. virtual ETextComparisonResult Compare (const TText & sourceText, const TText & targetText, TTextCount & sourceCharactersMatched, TTextCount & targetCharactersMatched) const

Interface Category:

API.

Purpose:

  1. Compares two text objects and returns the result as an ETextComparisonResult value.
  2. Compares two text objects and returns the result as an ETextComparisonResult value. Also fills in the given TTextCounts with the number of characters matched in both the source and the target strings.

Calling Context:

  1. Called by clients.
  2. Called by clients.

Parameters:

Return Value:

The ETextComparisonResult value containing the results of the comparison.

Concurrency:

Not multithread safe.

Other Considerations:

Overrides inherited TTextOrder function. This function does not distinguish between different ordering strengths. It returns only the values kSourceEqual, kSourcePrimaryGreater, and kSourcePrimaryLess.

Member Function: TBitwiseTextOrder::CreateTextPatternIterator

virtual TTextPatternIterator * CreateTextPatternIterator (const TText * text, const TText & pattern, const TTextRange & searchRange) const

Interface Category:

API.

Purpose:

Creates an object of the text pattern iterator class, TExactTextPatternIterator, that uses this text ordering class for pattern iteration.

Calling Context:

Called by clients.

Parameters:

Return Value:

A TExactTextPatternIterator object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Overrides inherited TTextOrder function.

Member Function: TBitwiseTextOrder::Hash

virtual long Hash () const

Interface Category:

API.

Purpose:

Generates a hash value.

Calling Context:

Called to generate a hash value.

Parameters:

Return Value:

The numeric value of the hash.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Overrides inherited MCollectible function.

Member Function: TBitwiseTextOrder::operator=

TBitwiseTextOrder & operator =(const TBitwiseTextOrder & order)

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: TBitwiseTextOrder::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: TBitwiseTextOrder::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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.