Class: TArchiveKey

Declaration: Archive.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

None.

Purpose:

Serves as a lookup key for objects stored in an archive. A TArchiveKey object contains the name and the locale of an archived object.

Instantiation:

Allocate on the heap or the stack. TArchiveKey is not generally instantiated by clients, but by a TArchiveIterator. The client is then responsible for deleting TArchiveKey instances returned by a TArchiveIterator.

Deriving Classes:

This class is designed to be used directly. Do not derive.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TArchiveKey::~TArchiveKey

virtual ~ TArchiveKey ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TArchiveKey::operator=

TArchiveKey & operator =(const TArchiveKey & otherKey)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Call this function directly.

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: TArchiveKey::Hash

virtual long Hash () const

Interface Category:

API.

Purpose:

Overrides inherited MCollectible function.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The numeric value of the hash.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TArchiveKey::operator>>=

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

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a reference to the stream on which the object has been put.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TArchiveKey::operator<<=

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

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a reference to the stream from which the object is taken.

Exceptions:

Throws an exception if this TArchiveKey instance is not the correct version.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TArchiveKey::GetObjectName

void GetObjectName (TText & key) const

Interface Category:

API.

Purpose:

Fills in the given text with the name of the object represented by this archive key.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TArchiveKey::GetLocale

TLocale GetLocale () const

Interface Category:

API.

Purpose:

Returns the locale containing the object represented by this archive key.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The locale for this object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TArchiveKey::operator==

bool operator ==(const TArchiveKey & otherKey) const

Interface Category:

API.

Purpose:

Comparison operator. Two TArchiveKeys are considered equal if their object names are equal and their locales are equal. Text styles are not considered when comparing object names.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if and only if the two TArchiveKeys have the same object name (regardless of text styles) and the same locales.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TArchiveKey::TArchiveKey

  1. TArchiveKey (const TText & key, const TLocale & locale)
  2. TArchiveKey (const TArchiveKey & otherKey)
  3. TArchiveKey ()

Interface Category:

API.

Purpose:

  1. Create a TArchiveKey from the given object name and the given locale.
  2. Copy constructor.
  3. Default constructor. Creates an uninitialized TArchiveKey.

Calling Context:

  1. Normal member function for creating a TArchiveKey.
  2. Called to copy an object.
  3. Called only by the ::Resurrect function. It should not be called otherwise.

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.