Class: TDocumentPresenterReference

Declaration: BasicDocument.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

None.

Purpose:

TDocumentPresenterReference is an address-space independent reference to a TDocumentPresenter object. The reference uses the document's reference and a global ID for the specific presenter on the document to identify the presenter. Document presenters are transient objects and are not stored persistently. The reference is good only as long as the object exists in memory.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Do not derive from this class.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TDocumentPresenterReference::TDocumentPresenterReference

  1. TDocumentPresenterReference (const TDocumentPresenter &)
  2. TDocumentPresenterReference (const TDocumentPresenterReference &)
  3. TDocumentPresenterReference ()

Interface Category:

API.

Purpose:

  1. Creates a reference that refers to the given document presenter.
  2. Copy constructor.
  3. Default constructor. Creates an invalid reference.

Calling Context:

  1. Call this function directly.
  2. Called to copy an object.
  3. Called by the stream-in operators. You can also call this function directly. This function creates an invalid reference--that is, it does not refer to any document.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

Preconditions: Assertion (TDocumentPresenter& is a valid document presenter).

Member Function: TDocumentPresenterReference::~TDocumentPresenterReference

~ TDocumentPresenterReference ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy the document presenter reference.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TDocumentPresenterReference::IsReferenceFor

bool IsReferenceFor (const TDocumentPresenter &) const

Interface Category:

API.

Purpose:

Determines whether the reference refers to the specified document presenter.

Calling Context:

Called to determine whether the reference refers to the specified document presenter.

Parameters:

Return Value:

Returns true if the reference refers to the specified presenter; false otherwise.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

Preconditions: Assertion (TDocumentPresenter& is a valid document presenter).

Member Function: TDocumentPresenterReference::operator=

TDocumentPresenterReference & operator =(const TDocumentPresenterReference & )

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Call this function by using the operator in an assignment statement. Both references refer to the same document presenter.

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:

Post Conditions: Assertion (presenter reference's ID is the same as the other presenter reference's ID).

Member Function: TDocumentPresenterReference::operator==

bool operator ==(const TDocumentPresenterReference &) const

Interface Category:

API.

Purpose:

Tests whether the two objects on either side of the ==symbol are equal. The objects are equal if they refer to the same document presenter.

Calling Context:

Call this function by using the operator in an expression.

Parameters:

Return Value:

Returns true if both references refer to the same document presenter; false otherwise.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

Preconditions: Assertion (TDocumentPresenterReference&) is a valid object.

Member Function: TDocumentPresenterReference::operator!=

bool operator != (const TDocumentPresenterReference &) const

Interface Category:

API.

Purpose:

Tests whether the two objects on either side of the ==symbol are not equal. The objects are not equal if they refer to different document presenters.

Calling Context:

Call this function by using the operator in an expression.

Parameters:

Return Value:

Returns true if the references refer to different document presenters; false otherwise.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

Preconditions: Assertion (theSpecifiedDocumentReference is a valid object).

Member Function: TDocumentPresenterReference::operator>>=

virtual TStream & operator >>=(TStream & towhere) 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:

Preconditions: Assertion (stream is opened for writing).

Member Function: TDocumentPresenterReference::operator<<=

virtual TStream & operator <<= (TStream & fromwhere)

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:

Preconditions: Assertion (stream is opened for reading).

Member Function: TDocumentPresenterReference::Hash

virtual long Hash () const

Interface Category:

API.

Purpose:

Generates a hash value for collection classes.

Calling Context:

Called by the collection classes.

Parameters:

Return Value:

Returns the hash value.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TDocumentPresenterReference::operatorTDocumentReference

operator TDocumentReference () const

Interface Category:

API.

Purpose:

Returns the TDocumentReference for which this object is a presenter.

Calling Context:

Call this operator directly.

Parameters:

Return Value:

Returns the TDocumentReference for which this object is a presenter.

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.