Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TGrafState
Inherited By:
None.
Purpose:
Developers should not use this class: it may be removed in future releases.
TGrafStateAccessor, a concrete class derived from TGrafState, provides an exception-safe means of accessing the graphic state contained in a port's TGrafState object. Instead of retrieving this TGrafState directly from the port and querying it through the usual functions (TGrafState::GetAttributeState, TGrafState::GetViewMatrixState, and so on), you create a TGrafStateAccessor object, passing a pointer to the port as an argument to the constructor. TGrafStateAccessor's constructor invokes TGrafPort::UseState to register usage of the port's TGrafState. (Registering usage doesn't reserve the TGrafState; other objects can still use it.) The constructor then calls TGrafPort::GetState to obtain a pointer to the TGrafState object. From then on, you can access the graphic state by calling TGrafStateAccessor::GetAttributeState. When the TGrafStateAccessor is deleted, its destructor calls TGrafPort::DoneWithState to unregister usage. Between the calls to TGrafPort::UseState and TGrafPort::DoneWithState, the values in the state are constant; no other object can change the state.
Instantiation:
Allocate on the heap or the stack. (The stack is recommended.)
Deriving Classes:
None.
Concurrency:
Not multithread safe.
Resource Use:
The TGrafPort passed to the constructor must exist as long as long as the TGrafStateAccessor exists.
Since the TGrafState in the port is held constant for the lifetime of the TGrafStateAccessor, you should delete the accessor as soon as you are finished using it.
TGrafStateAccessor (const TGrafPort *)
Interface Category:
API.
Purpose:
Developers should not use this function: it may be removed in future releases.
Constructor. Takes a pointer to a TGrafPort object. This object accesses the details of the graphic state in an exception-safe manner so that, during the lifetime of this object, no other object can modify the state variables of the TGrafPort. This constructor calls the port's UseState function.
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.
virtual ~ TGrafStateAccessor ()
Interface Category:
API.
Purpose:
Developers should not use this function: it may be removed in future releases.
Destructor. Calls the DoneWithState function of the access graph port to release the state variables for write access by other objects.
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.
virtual const TAttributeState * GetAttributeState () const
Interface Category:
API.
Purpose:
Developers should not use this function: it may be removed in future releases.
Returns a constant pointer to a TAttributeState containing 2-D attributes for the TGrafPort accessed by this object.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns a constant pointer to a TAttributeState containing 2-D attributes.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGrafStateAccessor::GetAttribute3DState
virtual const TAttribute3DState * GetAttribute3DState () const
Interface Category:
API.
Purpose:
Developers should not use this function: it may be removed in future releases.
Returns a constant pointer to a TAttribute3DState containing 3-D attributes for the TGrafPort accessed by this object.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns a constant pointer to a TAttribute3DState containing 3-D attributes.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGrafStateAccessor::GetViewMatrixState
virtual const TMatrixState * GetViewMatrixState () const
Interface Category:
API.
Purpose:
Developers should not use this function: it may be removed in future releases.
Returns a constant pointer to a TMatrixState that defines the 2-D view coordinate system for the TGrafPort accessed by this object.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns a constant pointer to a TMatrixState that defines the 2-D view coordinate system.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGrafStateAccessor::GetModelMatrixState
virtual const TMatrixState * GetModelMatrixState () const
Interface Category:
API.
Purpose:
Developers should not use this function: it may be removed in future releases.
Returns a constant pointer to a TMatrixState that defines the 2-D model coordinate system for the TGrafPort accessed by this object.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns a constant pointer to a TMatrixState that defines the 2-D model coordinate system.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual const TClipState * GetClipState () const
Interface Category:
API.
Purpose:
Developers should not use this function: it may be removed in future releases.
Returns a constant pointer to a TClipState that defines the 2-D clipping area for the TGrafPort accessed by this object.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns a constant pointer to a TClipState that defines the 2-D clipping area.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual const TSceneState * GetSceneState () const
Interface Category:
API.
Purpose:
Developers should not use this function: it may be removed in future releases.
Returns a constant pointer to a TSceneState containing global 3-D features, such as the camera and lights for the TGrafPort accessed by this object.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns a constant pointer to a TSceneState containing global 3-D features, such as the camera and lights.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGrafStateAccessor::GetModelMatrix3DState
virtual const TMatrix3DState * GetModelMatrix3DState () const
Interface Category:
API.
Purpose:
Developers should not use this function: it may be removed in future releases.
Returns a constant pointer to a TMatrix3DState that defines the 3-D model coordinate system for the TGrafPort accessed by this object.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns a constant pointer to a TMatrix3DState that defines the 3-D model coordinate system.
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.