Class: TCompoundDocumentStore

Declaration: CompoundDocumentStorage.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TDocumentStore

Inherited By:

None.

Purpose:

TCompoundDocumentStore is used for storing compound documents. It provides default storage bins for the command log and the document information of a compound document. The command log is used by the document store to provide a saveless document persistence implementation. It registers as a command status receiver on the document and saves the commands as they are performed. When resurrecting the document, it can apply these saved commands to bring the document back up to its former state. Commits on the store cause the store to flush the command log.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Concurrency:

Multithread safe. This class enforces multiple readers or single writer semantics by delegating concurrency control to its storage mechanism.

Resource Use:

This class is responsible for managing its own resources.

Other Considerations:

Invariants: Assertion (fStorageMechanism != NIL).

Member Function: TCompoundDocumentStore::TCompoundDocumentStore

  1. TCompoundDocumentStore (TMultiBinStorageMechanism *)
  2. TCompoundDocumentStore ()
  3. TCompoundDocumentStore (const TCompoundDocumentStore &)

Interface Category:

API.

Purpose:

  1. Creates a compound document store with the given storage mechanism.
  2. Default constructor. Used to resurrect a flattened document store instance. Only for internal use by Resurrect. This function is protected.
  3. Copy constructor. Only for internal use by Copy.

Calling Context:

  1. Called to create a compound document store with the given storage mechanism.
  2. Only for internal use by Resurrect. Developers should treat as protected.
  3. Called to copy an object. Only for internal use by Copy. Developers should treat as protected.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCompoundDocumentStore::~TCompoundDocumentStore

virtual ~ TCompoundDocumentStore ()

Interface Category:

API.

Purpose:

Destructor. Releases the storage mechanism resource. If the previous access mode is read-write, then others now have access. Otherwise, nothing changes.

Calling Context:

Called to destroy an object. Is called automatically by a TCompoundDocument destructor, such as when a compound document object is destroyed.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCompoundDocumentStore::CopyStoreAliasFor

static TCompoundDocumentStore* CopyStoreAliasFor (const TDocumentReference &)

Interface Category:

API.

Purpose:

Returns a new instance of a TCompoundDocumentStore that is responsible for managing the specified document's storage.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a new instance of a TCompoundDocumentStore that is responsible for managing the specified document's storage.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCompoundDocumentStore::CreateIn

virtual void CreateIn (TDocumentStore & aliasParentStore)

Interface Category:

API.

Purpose:

Creates the underlying physical storage mechanism underneath the specified parent store.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCompoundDocumentStore::CopyInto

virtual TDocumentStore * CopyInto (TDocumentStore & parent)

Interface Category:

API.

Purpose:

Copies this object's underlying physical storage mechanism underneath the specified parent store.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCompoundDocumentStore::Create

virtual void Create ()

Interface Category:

API.

Purpose:

Creates the underlying physical storage mechanism

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCompoundDocumentStore::Open

virtual void Open ( EAccessMode mode )

Interface Category:

API.

Purpose:

Opens the underlying physical storage mechanism and starts the command logging process.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCompoundDocumentStore::Close

virtual void Close ()

Interface Category:

API.

Purpose:

Closes the underlying physical storage mechanism.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCompoundDocumentStore::CreateSession

virtual TDocumentSession* CreateSession ( EAccessMode, ESharingMode )

Interface Category:

API.

Purpose:

Creates a new TCompoundDocumentSession.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCompoundDocumentStore::Resurrect

  1. virtual void Resurrect (TDocument * &)
  2. virtual void Resurrect (TCompoundDocument * &)

Interface Category:

API.

Purpose:

  1. Resurrects a prototypical version of this document.
  2. Resurrects a prototypical version of this document.

Calling Context:

  1. Called to resurrect the document.
  2. Called to resurrect the document.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

Postcondition: Assertion (theDocument != NIL).

Member Function: TCompoundDocumentStore::Commit

virtual void Commit (TDocument &)

Interface Category:

API.

Purpose:

Commits the document data.

Calling Context:

Called to commit the document data.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

Postcondition: Assert (the document is committed).

Member Function: TCompoundDocumentStore::operator>>=

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

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

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

Multithread safe.

Other Considerations:

None.

Member Function: TCompoundDocumentStore::operator<<=

virtual TStream & operator <<= (TStream &)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself in from.

Exceptions:

Throws a TInvalidVersionError if the version of the object on the stream is unknown to the version of the shared library installed.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCompoundDocumentStore::operator=

TCompoundDocumentStore & operator =(const TCompoundDocumentStore &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object.

Parameters:

Return Value:

Returns a const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

This function is protected.

Member Function: TCompoundDocumentStore::GetDocumentReference

virtual TDocumentReference GetDocumentReference () const

Interface Category:

API.

Purpose:

Creates and returns a TDocumentReference object for this TDocumentStore.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a reference to the new document reference object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

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.