Class: TGrafDeviceCache

Declaration: GrafDevices.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

None.

Purpose:

TGrafDeviceCache is the concrete base class for device caches. TGrafDeviceCache holds a rendering state for the device, allowing the device to be multithread safe. Typically, a TGrafPort asks the device to create a device cache. The device creates a TGrafDeviceCache on the heap and returns the cache to the port. The port then owns the storage for the cache and is responsible for deleting it. The port passes the nonconstant device cache back to the device in every render call. The concrete base class simply stores the device time stamp. The time stamp should be the same as the device's time stamp. A device can use a derived class of TGrafDeviceCache to add data to the cache. The device must then use RTTI to cast to its own TGrafDeviceCache derived class.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

None. Derived classes can be used to store additional data.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TGrafDeviceCache::TGrafDeviceCache

  1. TGrafDeviceCache ()
  2. TGrafDeviceCache (const TPseudoTimeStamp &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Creates a device cache whose time stamp is the specified value.

Calling Context:

  1. Called by the device creating the cache object.
  2. Called by the device creating the cache object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafDeviceCache::~TGrafDeviceCache

virtual ~ TGrafDeviceCache ()

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: TGrafDeviceCache::GetTimeStamp

virtual TPseudoTimeStamp GetTimeStamp () const

Interface Category:

API.

Purpose:

Returns the time stamp of the device cache.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the device cache's time stamp.

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.