Class: TDocumentComponentStore

Declaration: CompoundDocumentStorage.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TStore

Inherited By:

None.

Purpose:

TDocumentComponentStore is a TStore derived class used for storing document components. It provides default storage bins for the presenter state and the model of a document component.

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

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

Interface Category:

API.

Interface Category:

API.

Purpose:

  1. Creates a document component store with the given storage mechanism.
  2. Default constructor. Used to resurrect a flattened document component store instance.
  3. Copy constructor.

Calling Context:

  1. Called to create a document component 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:

The default and copy constructors are protected.

Member Function: TDocumentComponentStore::~TDocumentComponentStore

virtual ~ TDocumentComponentStore ()

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. This function is called automatically by a TDocumentComponent destructor, such as when a document component object is destroyed.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TDocumentComponentStore::CreateIn

virtual void CreateIn (TDocumentStore& )

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: TDocumentComponentStore::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: TDocumentComponentStore::Delete

virtual void Delete ()

Interface Category:

API.

Purpose:

Deletes 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: TDocumentComponentStore::ResurrectFromLastCommit

  1. virtual void ResurrectFromLastCommit (TModelPresenterState * &)
  2. virtual void ResurrectFromLastCommit (TModel * &)

Interface Category:

API.

Purpose:

  1. Resurrects the presenter state for a document component.
  2. Resurrects the model for a document component.

Calling Context:

  1. Called to resurrect the presenter state.
  2. Called to resurrect the model.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

  1. Postcondition:
  2. Assert (aPresenterState != NIL).
  3. Postcondition:
  4. Assert (aModel != NIL).

    Member Function: TDocumentComponentStore::Commit

  5. virtual void Commit (const TModelPresenterState &)
  6. virtual void Commit (const TModel &)

Interface Category:

API.

Purpose:

  1. Commits the presenter state of a document component.
  2. Commits the model of a document component.

Calling Context:

  1. Called to commit the presenter state.
  2. Called to commit the model.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

  1. Postcondition:
  2. Assert (aPresenterState is committed).
  3. Postcondition:
  4. Assert (aModel is committed).

    Member Function: TDocumentComponentStore::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: TDocumentComponentStore::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: TDocumentComponentStore::operator=

TDocumentComponentStore & operator =(const TDocumentComponentStore &)

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:

None.

Member Function: TDocumentComponentStore::AdoptStorageMechanism

void AdoptStorageMechanism (TMultiBinStorageMechanism *)

Interface Category:

API.

Purpose:

Allows a new mechanism to be adopted into the 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: TDocumentComponentStore::GetStorageMechanism

  1. TMultiBinStorageMechanism * GetStorageMechanism ()
  2. const TMultiBinStorageMechanism * GetStorageMechanism () const

Interface Category:

API.

Purpose:

  1. Returns a pointer to this store's underlying storage mechanism.
  2. Returns a const pointer to this store's underlying storage mechanism.

Calling Context:

  1. Call this function directly.
  2. Call this function directly.

Parameters:

Return Value:

  1. Returns a pointer to this store's underlying storage mechanism.
  2. Returns a const pointer to this store's underlying storage mechanism.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TDocumentComponentStore::CopyStoreAliasFor

  1. static TDocumentComponentStore * CopyStoreAliasFor (const TDocumentComponentReference &)
  2. static TDocumentComponentStore * CopyStoreAliasFor (const TModelReference &)
  3. static TDocumentComponentStore * CopyStoreAliasFor (const TPresenterStateReference &)

Interface Category:

API.

Purpose:

  1. Looks up and makes a copy of the store used to store the specified document component. The copy is then returned to the caller.
  2. Looks up and makes a copy of the store used to store the specified model. The copy is then returned to the caller.
  3. Looks up and makes a copy of the store used to store the specified presenter state. The copy is then returned to the caller.

Calling Context:

  1. Call this function directly.
  2. Call this function directly.
  3. Call this function directly.

Parameters:

Return Value:

Returns the newly created copy of the store for the specified 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.