Class: TModelPointer

Declaration: CompoundDocument.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

TModelPointerTo

Purpose:

Primarily used as an implementation class for TModelPointerTo. This class performs lazy locking for the model.

Instantiation:

Always allocate on the stack.

Deriving Classes:

This class is designed to be the base class for the TModelPointerTo template. Do not derive from this class.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TModelPointer::TModelPointer

TModelPointer (const TModelReference &)

Interface Category:

API.

Purpose:

Creates a TModelPointer for the specified model reference. This constructor doesn't lock the model, because it doesn't know whether a read or a write lock is required.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TModelPointer::~TModelPointer

~ TModelPointer ()

Interface Category:

API.

Purpose:

Destructor. If a lock has been acquired, this function unlocks the model.

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: TModelPointer::GetModelForWriting

TModel * GetModelForWriting ()

Interface Category:

API.

Purpose:

Locks the model for writing, and then returns a pointer to the model. The model remains locked until the TModelPointer object is destroyed.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a pointer to the locked model.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TModelPointer::GetModelForReading

const TModel * GetModelForReading () const

Interface Category:

API.

Purpose:

Locks the model for reading, and then returns a pointer to the model. The model remains locked until the TModelPointer object is destroyed.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a pointer to the locked model

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.