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).
- TCompoundDocumentSession (TCompoundDocumentStore & theDoc, TStore:: EAccessMode, TDocumentStore::ESharingMode =TDocumentStore::kNonShared)
- TCompoundDocumentSession ()
Interface Category:
API.
Purpose:
- 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.
- Default constructor.
Calling Context:
- Called by the TDocumentProgram object.
- Called to copy an object. Only for internal use by Resurrect. Developers should treat as protected.
Parameters:
- TCompoundDocumentStore & theDoc -The document store containing the document data that is to be managed by this document server process.
- TStore::EAccessMode -The access mode to open the document store.
- TDocumentStore::ESharingMode =TDocumentStore::kNonShared -The sharing mode to open the document store.
- Takes no parameters.
Return Value:
None.
Exceptions:
- 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).
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.
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.
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.
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.
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.