Class: TKeyValuePairComparator

Declaration: KeyValuePairComparator.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

TKnownCanonicalObjectKeyValueComparator TMCollectibleKeyValuePairComparator

Purpose:

An abstract class that you can use to perform comparison and hash operations on KeyValuePair objects or individual objects.

Instantiation:

Always allocate on the heap.

Deriving Classes:

None.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TKeyValuePairComparator::~TKeyValuePairComparator

virtual ~ TKeyValuePairComparator ()

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

virtual EComparisonResult Compare (const TKeyValuePair < AKey, AValue >& leftObj, const TKeyValuePair < AKey, AValue >& rightObj) const

Interface Category:

API.

Purpose:

Compares two KeyValuePair objects .

Calling Context:

Call this function directly to compare two objects by comparing their keys.

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: TKeyValuePairComparator::GetHash

virtual HashResult GetHash (const TKeyValuePair < AKey, AValue >& obj) const

Interface Category:

API.

Purpose:

Generates a hash value for the KeyValuePair object key.

Calling Context:

Call this function directly to generate a hash value for the key of the object.

Parameters:

Return Value:

The hash value generated.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TKeyValuePairComparator::CompareValue

virtual EComparisonResult CompareValue (const AValue & leftObj, const AValue & rightObj) const

Interface Category:

API.

Purpose:

Compares two objects of the AValue type.

Calling Context:

Call this function directly to compare two 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: TKeyValuePairComparator::CompareKey

virtual EComparisonResult CompareKey (const AKey & leftObj, const AKey & rightObj) const

Interface Category:

API.

Purpose:

Compares two objects of the AKey type.

Calling Context:

Call this function directly to compare two 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: TKeyValuePairComparator::GetKeyHash

virtual HashResult GetKeyHash (const AKey & obj) const

Interface Category:

API.

Purpose:

Computes the hash value for the object of AKey type.

Calling Context:

Call this function directly to compute the hash value for the object of AKey type.

Parameters:

Return Value:

The hash result.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TKeyValuePairComparator::TypeSafeGetHash

virtual HashResult TypeSafeGetHash (void * obj) const

Interface Category:

API.

Purpose:

Casts to AKey type and computes the hash value.

Calling Context:

Call this function directly to call to Casts to AKey type and compute the hash value.

Parameters:

Return Value:

The hash result.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TKeyValuePairComparator::TypeSafeCompare

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

Interface Category:

API.

Purpose:

Compares two objects of the AKey type.

Calling Context:

Call this function directly to compare two objects of AKey type.

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: TKeyValuePairComparator::TypeSafeCompareValue

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

Interface Category:

API.

Purpose:

Compares two objects of the AValue type.

Calling Context:

Call this function directly to compare two objects of AValue type.

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

TKeyValuePairComparator ()

Interface Category:

API.

Purpose:

Default constructor.

Calling Context:

Call this function directly to construct an object.

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.