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.
~ 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.
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:
- const TText & objectName -The name of the archived object to be replaced.
- const AType & objectToReplace -The replacement object.
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.
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:
- const TText & objectName -The name to be given to the new object in the archive.
- const AType & objectToAdd -The new object to be added to the archive.
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.
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:
- const TText & objectName -The name of the object to retrieve.
Return Value:
A pointer to the object retrieved.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not Multithread safe.
Other Considerations:
None.
- TArchiveEnvelope (TArchive * archive)
- TArchiveEnvelope (TArchive * archive, const TLocale & locale)
- TArchiveEnvelope ()
Interface Category:
API.
Purpose:
- Create an envelope for the given archive and the current locale.
- Create an envelope for the given archive and the given locale.
- Default constructor. Creates an uninitialized envelope. Do not use.
Calling Context:
- Call this function directly.
- Call this function directly.
- Called by the stream-in operators.
Parameters:
- TArchive * archive -The archive to be read or written by this envelope.
- TArchive * archive -The archive to be read or written by this envelope.
- const TLocale & locale -The locale under which items will be read or written in this archive.
- Takes no 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.