Class: TArchiveEnvelope

Declaration: Archive.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

None.

Purpose:

TArchiveEnvelope provides an interface for reading and writing objects in an archive. TArchiveEnvelope is a template class that must be specialized to the type of the object to be read or written.

Instantiation:

Allocate on the heap or stack.

Deriving Classes:

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

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TArchiveEnvelope::~TArchiveEnvelope

~ TArchiveEnvelope ()

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: TArchiveEnvelope::ReplaceObject

bool ReplaceObject (const TText & objectName, const AType & objectToReplace)

Interface Category:

API.

Purpose:

Finds an object in the archive with the given name and replaces it with the given object.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns false, and does not replace the object if the named object does not already exist in the archive. Returns true otherwise.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not Multithread safe.

Other Considerations:

None.

Member Function: TArchiveEnvelope::AddObject

bool AddObject (const TText & objectName, const AType & objectToAdd)

Interface Category:

API.

Purpose:

Adds the given object to the archive under the given name.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns false and does not add the object if the named object already exists in the archive. Returns true otherwise.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not Multithread safe.

Other Considerations:

None.

Member Function: TArchiveEnvelope::CopyObject

AType * CopyObject (const TText & objectName) const

Interface Category:

API.

Purpose:

Return a copy of the archived object with the given name. The copied object is allocated on the heap.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A pointer to the object retrieved.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not Multithread safe.

Other Considerations:

None.

Member Function: TArchiveEnvelope::TArchiveEnvelope

  1. TArchiveEnvelope (TArchive * archive)
  2. TArchiveEnvelope (TArchive * archive, const TLocale & locale)
  3. TArchiveEnvelope ()

Interface Category:

API.

Purpose:

  1. Create an envelope for the given archive and the current locale.
  2. Create an envelope for the given archive and the given locale.
  3. Default constructor. Creates an uninitialized envelope. Do not use.

Calling Context:

  1. Call this function directly.
  2. Call this function directly.
  3. Called by the stream-in operators.

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.