Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TAbstractDocument
Inherited By:
TCompoundDocumentSurrogate
Purpose:
The document surrogate provides a stand-in for the document. Clients of the document surrogate can use it to manipulate the real document regardless as to whether the document is in the same address space or in a remote address space.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
Derived classes can add interfaces specific to a derived class of TDocumentState. All member functions should be implemented as TDocumentFunctors, allowing both remote and local access.
Concurrency:
Multithread safe.
Resource Use:
No special requirements.
- TDocumentSurrogate (const TDocumentSurrogate &) ;
- TDocumentSurrogate (const TDocumentReference &, TStore::EAccessMode aMode =TStore::kReadWrite, TDocumentStore::ESharingMode sMode =TDocumentStore::kNonShared ) ;
- TDocumentSurrogate ()
Interface Category:
API.
Purpose:
- Copy constructor.
- Creates a surrogate to stand in for the document referred to by the document reference.
- Default constructor. For streaming only.
Calling Context:
- Called to copy an object. Call this function directly.
- Call this function directly.
- Called by the stream-in operators.
Parameters:
Return Value:
None.
Exceptions:
Throws TDocumentException(kStoreDoesNotExist) if the store for the document does not exist.
Throws TDocumentException(kConnectToDocumentFailed) if the attempt to connect to a remote document fails.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual ~ TDocumentSurrogate ()
Interface Category:
API.
Purpose:
Destructor.
Calling Context:
Called to destroy an object. Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual bool IsLocal () const
Interface Category:
API.
Purpose:
Ascertains whether the document is in the same address space as the client.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if the actual document is in the same address space as the client; false otherwise.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual bool IsWriteable () const
Interface Category:
API.
Purpose:
Ascertains whether the document has been opened for writing.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if the document has been opened for writing; false otherwise.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual bool IsAnnotatable () const
Interface Category:
API.
Purpose:
Ascertains whether the document has been opened for writing or for annotations.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if the document has been opened for writing or annotations; false otherwise.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
void AdoptAndDo (TCommandBinding *)
Interface Category:
API.
Purpose:
Adopts and executes the simple command binding. If the document is remote, the command is sent to the remote document to execute. The binding is deleted after it is executed.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual TStream & operator >>=(TStream & towhere) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & towhere -The stream the object streams itself out to.
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.
virtual TStream & operator <<= (TStream & fromwhere)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & fromwhere -The stream the object streams itself in from.
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.
TDocumentSurrogate & operator =(const TDocumentSurrogate &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Call this function by using the operator in an assignment statement.
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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.