Class: TTextOrderComparator

Declaration: TextComparison.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TOrderedComparator

Inherited By:

None.

Purpose:

Derived from TComparator<TText>, TTextOrderComparator performs comparisons based on a TTextOrder object. If no text ordering object is specified, this class performs bitwise comparisons.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

The class is designed to be used directly.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TTextOrderComparator::~TTextOrderComparator

virtual ~ TTextOrderComparator ()

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: TTextOrderComparator::TTextOrderComparator

TTextOrderComparator (TTextOrder * order =NIL)

Interface Category:

API.

Purpose:

Constructs a TTextOrderComparator object with the specified text ordering object.

Calling Context:

Called to instantiate this class.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTextOrderComparator::Compare

virtual EComparisonResult Compare (const TText & leftObj, const TText & rightObj) const

Interface Category:

API.

Purpose:

Compares two text objects, returning the results as an EComparisonResult value.

Calling Context:

Called by clients.

Parameters:

Return Value:

The EComparisonResult value indicating the result of the comparison.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTextOrderComparator::OrderedCompare

virtual EComparisonResult OrderedCompare (const TText & leftText, const TText & rightText) const >Interface Category: API.

Purpose:

Compares two text objects, returning the results as an EComparisonResult value.

Calling Context:

Called by clients.

Parameters:

Return Value:

The EComparisonResult value indicating the result of the comparison.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

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

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

virtual HashResult GetHash (const TText & obj) const

Interface Category:

API.

Purpose:

Returns the result of calculating a hash value on the specified text object.

Calling Context:

Called to get the hash value.

Parameters:

Return Value:

The hash value.

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.