Class: TAbstractComparator

Declaration: Comparator.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

TComparator

Purpose:

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

Instantiation:

Allocate on the heap.

Deriving Classes:

Do not derive any classes from TAbstractComparator.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TAbstractComparator::~TAbstractComparator

virtual ~ TAbstractComparator ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Call this function directly 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: TAbstractComparator::TypeSafeCompare

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

Interface Category:

API.

Purpose:

Compares two objects with respect to their types.

Calling Context:

Call this function directly to compare two objects of unknown 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: TAbstractComparator::TypeSafeGetHash

virtual HashResult TypeSafeGetHash (void * obj) const

Interface Category:

API.

Purpose:

Generates a hash value for an object with respect to its type.

Calling Context:

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

Parameters:

Return Value:

Returns the hash result.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TAbstractComparator::operator>>=

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

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Call this function directly to stream out data. Call this function directly to stream the comparator.

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: TAbstractComparator::operator<<=

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

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Call this function directly to stream in data. Call this function directly to stream the comparator.

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

  1. TAbstractComparator ()
  2. TAbstractComparator (const TAbstractComparator &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Call this function directly anywhere the creation of a TAbstractComparator object 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: TAbstractComparator::operator=

const TAbstractComparator & operator =(const TAbstractComparator &)

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