Class: TTuple

Declaration: Tuple.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

None.

Purpose:

This class is used as a simple wrapper for a key and value pointer, and the hash value of the key. Keys and values can be any type of object pointers.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

This s simple utility class. It should not be derived.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TTuple::TTuple

  1. TTuple ()
  2. TTuple (const TTuple & src)
  3. TTuple (void * key, void * value, CollectionHash hash)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.
  3. Creates a TTuple and sets its key, value and hash value.

Calling Context:

  1. Call this function directly to create an object.
  2. Call this function directly to copy an object.
  3. Call this function directly to create an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTuple::~TTuple

~ TTuple ()

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: TTuple::GetKey

void * GetKey () const

Interface Category:

API.

Purpose:

Return a pointer to the key object.

Calling Context:

Call this function directly to get the pointer to the key object.

Parameters:

Return Value:

Pointer to key object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTuple::GetValue

void * GetValue () const

Interface Category:

API.

Purpose:

Return a pointer to the value object.

Calling Context:

Call this function directly to get the pointer to the value object.

Parameters:

Return Value:

Pointer to value object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTuple::GetHash

CollectionHash GetHash () const

Interface Category:

API.

Purpose:

Returns hash value of key object.

Calling Context:

Call this function directly to return hash value of key object.

Parameters:

Return Value:

Returns key object hash value.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTuple::SetKey

void SetKey (void * key)

Interface Category:

API.

Purpose:

Sets the key pointer.

Calling Context:

Call this function directly to set the key pointer.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTuple::SetValue

void SetValue (void * value)

Interface Category:

API.

Purpose:

Sets the value pointer.

Calling Context:

Call this function directly to set the value pointer.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTuple::SetHash

void SetHash (CollectionHash hash)

Interface Category:

API.

Purpose:

Set the hash value of the key object.

Calling Context:

Call this function directly to set the hash value of the key object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTuple::operator=

const TTuple & operator =(const TTuple & that)

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

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

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Call this function directly 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: TTuple::operator<<=

TStream & operator <<= (TStream & fromwhere)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

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