Class: TCompoundDocumentSession

Declaration: CompoundDocument.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TDocumentSession

Inherited By:

None.

Purpose:

Used by the document registry to manage a document server task. It creates an IPC port and asks the store to create a document. An instance of this class is instantiated automatically by the framework when the Document Registry starts up a document server process.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

None.

Concurrency:

Multithread safe.

Resource Use:

No special requirements.

Other Considerations:

Invariants: Assertion (GetCompoundDocument() != NIL).

Member Function: TCompoundDocumentSession::TCompoundDocumentSession

  1. TCompoundDocumentSession (TCompoundDocumentStore & theDoc, TStore:: EAccessMode, TDocumentStore::ESharingMode =TDocumentStore::kNonShared)
  2. TCompoundDocumentSession ()

Interface Category:

API.

Purpose:

  1. Constructs a document session. It must be passed a valid TCompoundDocumentStore object. If the sharing model is kShared, the session either starts a new collaborative session for the document, or joins an existing one.
  2. Default constructor.

Calling Context:

  1. Called by the TDocumentProgram object.
  2. Called to copy an object. Only for internal use by Resurrect. Developers should treat as protected.

Parameters:

Return Value:

None.

Exceptions:

  1. Throws kNILDocument if theDoc ==NIL.

Concurrency:

Multithread safe.

Other Considerations:

The default and copy constructors are protected. Preconditions: Assertion (theDocumentStore != NIL). Postconditions: Assertion (GetDocument() != NIL).

Member Function: TCompoundDocumentSession::~TCompoundDocumentSession

virtual ~ TCompoundDocumentSession ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called by the TDocumentProgram object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCompoundDocumentSession::GetCompoundDocument

TCompoundDocument * GetCompoundDocument () const

Interface Category:

API.

Purpose:

Called to get the compound document object that is managed by this document session.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a TCompoundDocument object.

Exceptions:

Throws TCompoundDocumentException::kDocumentDoesNotExist if the compound document object is NIL.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCompoundDocumentSession::GetSession

static TCompoundDocumentSession * GetSession ()

Interface Category:

API.

Purpose:

Static class member function that returns the one document session in this process.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the session for the local task.

Exceptions:

Throws TCompoundDocumentException::kSessionDoesNotExist if there is no document session in this process.

Concurrency:

Multithread safe.

Other Considerations:

Preconditions: A TCompoundDocumentSession instance must have been created.

Member Function: TCompoundDocumentSession::SetUpAfterStart

virtual void SetUpAfterStart ()

Interface Category:

API.

Purpose:

Does any necessary initialization.

Calling Context:

Called by TDocumentSession to let derived classes do additional initialization prior to telling the document registry that the document can handle outside requests.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

This function is protected.

Member Function: TCompoundDocumentSession::CleanUpBeforeShutdown

virtual void CleanUpBeforeShutdown ()

Interface Category:

API.

Purpose:

Does any necessary clean up.

Calling Context:

Called by TDocumentSession to let derived classes do additional work prior to deleting the object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

This function is protected.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.