casa
$Rev:20696$
|
Assistance class for auto-caching of DisplayData objects. More...
#include <CachingDisplayMethod.h>
Public Member Functions | |
CachingDisplayMethod (WorldCanvas *worldCanvas, AttributeBuffer *wchAttributes, AttributeBuffer *ddAttributes, CachingDisplayData *parentDisplayData) | |
Constructor. | |
virtual | ~CachingDisplayMethod () |
Destructor. | |
virtual WorldCanvas * | worldCanvas () |
Return the WorldCanvas recorded in this CachingDisplayMethod. | |
virtual void | draw (Display::RefreshReason reason, WorldCanvasHolder &wcHolder) |
Draw this slice of data on the supplied WorldCanvasHolder. | |
Protected Member Functions | |
CachingDisplayMethod () | |
(Required) default constructor. | |
CachingDisplayMethod (const CachingDisplayMethod &other) | |
(Required) copy constructor. | |
void | operator= (const CachingDisplayMethod &other) |
(Required) copy assignment. | |
virtual Bool | drawIntoList (Display::RefreshReason reason, WorldCanvasHolder &wcHolder)=0 |
Draw into a cached drawing list, called by draw function. | |
Private Attributes | |
WorldCanvas * | itsWorldCanvas |
Store for the WorldCanvas which this has previously drawn upon. | |
AttributeBuffer * | itsWCHAttributes |
Store for WorldCanvasHolder- and DisplayData-specific AttributeBuffers. | |
AttributeBuffer * | itsDDAttributes |
Bool | itsHasList |
Do we have a cached drawing list? | |
uInt | itsCachedDrawingList |
Store for cached drawing list number. |
Assistance class for auto-caching of DisplayData objects.
Public interface
"CachingDisplayMethod" is an implementation of a DisplayMethod which provides a single element in a cache of individual depictions of some data.
Definition at line 66 of file CachingDisplayMethod.h.
casa::CachingDisplayMethod::CachingDisplayMethod | ( | WorldCanvas * | worldCanvas, |
AttributeBuffer * | wchAttributes, | ||
AttributeBuffer * | ddAttributes, | ||
CachingDisplayData * | parentDisplayData | ||
) |
Constructor.
A single instance of a CachingDisplayMethod is setup to draw on a particular WorldCanvas, and only when particular conditions, as stored in the provided AttributeBuffers, are met. The parent DisplayData is given in parentDisplayData
.
virtual casa::CachingDisplayMethod::~CachingDisplayMethod | ( | ) | [virtual] |
Destructor.
casa::CachingDisplayMethod::CachingDisplayMethod | ( | ) | [protected] |
(Required) default constructor.
casa::CachingDisplayMethod::CachingDisplayMethod | ( | const CachingDisplayMethod & | other | ) | [protected] |
(Required) copy constructor.
virtual void casa::CachingDisplayMethod::draw | ( | Display::RefreshReason | reason, |
WorldCanvasHolder & | wcHolder | ||
) | [virtual] |
Draw this slice of data on the supplied WorldCanvasHolder.
Implements casa::DisplayMethod.
virtual Bool casa::CachingDisplayMethod::drawIntoList | ( | Display::RefreshReason | reason, |
WorldCanvasHolder & | wcHolder | ||
) | [protected, pure virtual] |
Draw into a cached drawing list, called by draw function.
The return value is set False if the DM could not draw or does not wish a drawlist to be saved.
Implemented in casa::MSAsRasterDM, casa::RegionShapeDM, casa::WedgeDM, casa::TblAsXYDM, casa::TblAsRasterDM, casa::TblAsContourDM, casa::Histogram2dDM, casa::Profile2dDM, casa::AxesDisplayMethod, casa::DrawingDisplayMethod, casa::SkyCatOverlayDM, and casa::WorldAxesDM.
void casa::CachingDisplayMethod::operator= | ( | const CachingDisplayMethod & | other | ) | [protected] |
(Required) copy assignment.
virtual WorldCanvas* casa::CachingDisplayMethod::worldCanvas | ( | ) | [inline, virtual] |
Return the WorldCanvas recorded in this CachingDisplayMethod.
Definition at line 84 of file CachingDisplayMethod.h.
References itsWorldCanvas.
Referenced by casa::MSAsRasterDM::drawIntoList().
Store for cached drawing list number.
Definition at line 121 of file CachingDisplayMethod.h.
Definition at line 115 of file CachingDisplayMethod.h.
Bool casa::CachingDisplayMethod::itsHasList [private] |
Do we have a cached drawing list?
Definition at line 118 of file CachingDisplayMethod.h.
Store for WorldCanvasHolder- and DisplayData-specific AttributeBuffers.
Definition at line 115 of file CachingDisplayMethod.h.
Store for the WorldCanvas which this has previously drawn upon.
Definition at line 111 of file CachingDisplayMethod.h.
Referenced by worldCanvas().