Class: TModelReference

Declaration: CompoundDocument.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

None.

Purpose:

Provides a simple reference to the model instance. If the referenced model is persistent, this reference is valid across multiple sessions of the document.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

TModelReference is monomorphic and is not derived from.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TModelReference::TModelReference

  1. TModelReference (const TAbstractModel &)
  2. TModelReference (const TModelReference &)
  3. TModelReference ()

Interface Category:

API.

Purpose:

  1. Creates a reference for a specific model.
  2. Copy constructor.
  3. Default constructor.

Calling Context:

  1. Call this function directly.
  2. Called to copy an object.
  3. Called by the stream-in operators and to create an undefined reference.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TModelReference::~TModelReference

virtual ~ TModelReference ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TModelReference::IsReferenceFor

bool IsReferenceFor (const TAbstractModel &) const

Interface Category:

API.

Purpose:

Determines if this reference is for a specific model.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if this reference is for the model.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TModelReference::IsDefined

bool IsDefined () const

Interface Category:

API.

Purpose:

Determines if this reference is defined to refer to a model.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if this reference is defined to refer to a model.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TModelReference::operatorTDocumentReference

operator TDocumentReference () const

Interface Category:

API.

Purpose:

Converts this reference to a reference to the document containing the model this reference refers to.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a reference to the document.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TModelReference::operator=

TModelReference & operator =(const TModelReference &)

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:

Not multithread safe.

Other Considerations:

None.

Member Function: TModelReference::operator==

bool operator ==(const TModelReference &) const

Interface Category:

API.

Purpose:

Compares two reference objects for equality. The references are equal if they refer to the same model. Two undefined references are not equal.

Calling Context:

You can call this function directly

Parameters:

Return Value:

Returns true if the references are for the same model.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TModelReference::operator!=

bool operator != (const TModelReference &) const

Interface Category:

API.

Purpose:

Compares two references for inequality. The references are not equal if they do not refer to the same model, or if either or both are undefined.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if the references are not to the same model.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TModelReference::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:

Not multithread safe.

Other Considerations:

None.

Member Function: TModelReference::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 no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TModelReference::Hash

virtual long Hash () const

Interface Category:

API.

Purpose:

Speeds comparison.

Calling Context:

Called by collections when comparing objects.

Parameters:

Return Value:

Returns the integer hash value.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not 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.