Class: TOrderedComparator

Declaration: Comparator.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TComparator

Inherited By:

TKnownCanonicalObjectComparator TMOrderableCollectibleComparator TOrderedOperatorComparator TTextOrderComparator TOrderNewestEntityFirst TOrderOldestEntityFirst

Purpose:

TOrderedComparator is an abstract class that performs comparison and hash operations on comparator objects.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Do not derive any classes from TOrderedComparator.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TOrderedComparator::OrderedCompare

virtual EComparisonResult OrderedCompare (const AType & leftObj, const AType & rightObj) const

Interface Category:

API.

Purpose:

Compares two objects of the same type.

Calling Context:

Call this function directly to compare two objects. Normally called internally. Could be called by anyone to do an ordered compare of two AType objects.

Parameters:

Return Value:

Returns kLessThan, kGreaterThan, kEqual, kNotEqual, or kUndefined.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TOrderedComparator::TypeSafeCompare

virtual EComparisonResult TypeSafeCompare (void * leftObj, void * rightObj) const

Interface Category:

API.

Purpose:

Compares two objects of different types.

Calling Context:

Call this function directly to compare two objects of different types. Call this function internally.

Parameters:

Return Value:

Returns kLessThan, kGreaterThan, kEqual, kNotEqual, or kUndefined.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TOrderedComparator::TOrderedComparator

  1. TOrderedComparator ()
  2. TOrderedComparator (const TOrderedComparator < AType > &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Call this function directly anywhere the creation of a TOrderedComparator is desired.
  2. Call this function directly 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: TOrderedComparator::operator=

const TOrderedComparator < AType > & operator =(const TOrderedComparator < AType > &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Call this function directly when an object is assigned to another compatible object.

Parameters:

Return Value:

A reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TOrderedComparator::Compare

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

Interface Category:

API.

Purpose:

Compares two objects of the same type.

Calling Context:

Not called on this object. See OrderedCompare().

Parameters:

Return Value:

Returns kLessThan, kGreaterThan, kEqual, kNotEqual, or kUndefined.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TOrderedComparator::GetHash

virtual HashResult GetHash (const AType & obj) const

Interface Category:

API.

Purpose:

Generates a hash value for an object.

Calling Context:

Call this function directly to generate a hash value for an object.

Parameters:

Return Value:

The hash value generated.

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.