Class: TTableBasedTextOrder

Declaration: TextComparison.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TLanguageTextOrder

Inherited By:

None.

Purpose:

TTableBasedTextOrder is a concrete class derived from TLanguageTextOrder. It provides the protocol for language-sensitive comparison of text strings based on a collation table that provides the ordering rules for a particular language.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

This class is designed to be used directly.

Concurrency:

Not multithread safe.

Resource Use:

The tables used by a TTableBasedTextOrder object live in shared memory and can be shared system wide. The actual TTableBasedTextOrder object is therefore not particularly large. Because of the data encapsulated by an instance of this class, it can be very large. Only instantiate it when necessary.

Member Function: TTableBasedTextOrder::~TTableBasedTextOrder

virtual ~ TTableBasedTextOrder ()

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: TTableBasedTextOrder::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.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Overrides inherited TLanguageTextOrder function.

Member Function: TTableBasedTextOrder::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, TStandardTextPatternIterator, that uses this text ordering class for pattern iteration.

Calling Context:

Called by clients.

Parameters:

Return Value:

A TStandardTextPatternIterator object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Overrides inherited TLanguageTextOrder function.

Member Function: TTableBasedTextOrder::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: TTableBasedTextOrder::operator=

TTableBasedTextOrder & operator =(const TTableBasedTextOrder & 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: TTableBasedTextOrder::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: TTableBasedTextOrder::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: TTableBasedTextOrder::TTableBasedTextOrder

  1. TTableBasedTextOrder (const TTableBasedTextOrder & order)
  2. TTableBasedTextOrder (const TToken & name)

Interface Category:

API.

Purpose:

  1. Copy constructor.
  2. Constructs a text ordering object using the collation table identified by the argument.

Calling Context:

  1. Called to copy an object.
  2. Called to construct a text ordering object with a particular collation table.

Parameters:

Return Value:

None.

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.