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.
- TGrafDeviceCache ()
- TGrafDeviceCache (const TPseudoTimeStamp &)
Interface Category:
API.
Purpose:
- Default constructor.
- Creates a device cache whose time stamp is the specified value.
Calling Context:
- Called by the device creating the cache object.
- 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.
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.
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.