Class: TRootGrafPort

Declaration: GrafPort.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TGrafPort

Inherited By:

None.

Purpose:

TRootGrafPort is a concrete class derived from TGrafPort. A TRootGrafPort represents the top port of a port hierarchy. (Ports lower in the hierarchy are represented by TLinkedGrafPort derived classes.) By definition, a TRootGrafPort has no parent port. Its TGrafDevice is specified by the constructor argument, and the device cache is obtained from the device. The TRootGrafPort provides reasonable default graphic state values, including identity matrices and infinite clip boundaries, default attributes as specified by the TRootAttributeState, TRootAttribute3DState and TRootSceneState classes, and a 3-D model matrix that is linked to the default scene state's camera. Other than its different constructor, the TRootGrafPort class adds no new member functions to those provided by its base class.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

None.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TRootGrafPort::TRootGrafPort

TRootGrafPort (TGrafDevice * referencedDevice)

Interface Category:

API.

Purpose:

Constructor. Takes a TGrafDevice object as the device to use for this graph port object. The device cache is obtained from the given TGrafDevice. The default values for the port are obtained by the default constructors of the various state objects it uses (such as TRootGrafState, which uses TRootAttribute3DState, and TRootSceneState, and so on). The clip boundary is set to infinity and the 3-D model matrix is linked to the default scene state's camera. The 2-D model and view coordinate system are set to identity.

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: TRootGrafPort::~TRootGrafPort

virtual ~ TRootGrafPort ()

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: TRootGrafPort::GetDevice

virtual TGrafDevice * GetDevice ()

Interface Category:

API.

Purpose:

Returns a pointer to the TGrafDevice to which this port draws its graphics.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a pointer to the TGrafDevice to which this port draws its graphics.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRootGrafPort::GetCache

virtual TGrafDeviceCache * GetCache ()

Interface Category:

API.

Purpose:

Returns a pointer to the TGrafDeviceCache associated with the device to which this port draws its graphics.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a pointer to the TGrafDeviceCache associated with the device.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRootGrafPort::GetState

virtual const TGrafState * GetState () const

Interface Category:

API.

Purpose:

Returns a pointer to a TGrafState object that represents the graphic state of this object.

Calling Context:

Do not call this function directly. This function is designed to be called by internal classes of the Graphics system (most notably, TGrafStateAccessor).

Parameters:

Return Value:

Returns a constant pointer to the concatenated graphic state.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRootGrafPort::UseState

virtual void UseState () const

Interface Category:

API.

Purpose:

Marks the graphic state as being in use so that no changes to the state are made until the DoneWithState function is called.

Calling Context:

Do not call this function directly. This function is designed to be called by internal classes of the Graphics system (most notably, TGrafStateAccessor).

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Deriving classes must override this function.

Member Function: TRootGrafPort::DoneWithState

virtual void DoneWithState () const

Interface Category:

API.

Purpose:

Marks the graphic state as being no longer in use so that changes to the state can be made.

Calling Context:

Do not call this function directly. This function is designed to be called by internal classes of the Graphics system (most notably, TGrafStateAccessor).

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Deriving classes must override this function.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.