DisplayMethod.h

Classes

DisplayMethod -- Base class for drawing a particular element (view) of a DisplayData. (full description)

class DisplayMethod

Interface

Public Members
DisplayMethod(DisplayData *parentDisplayData)
virtual ~DisplayMethod()
virtual void draw(Display::RefreshReason reason, WorldCanvasHolder &wcHolder) = 0
virtual void cleanup()
void addRestriction(Attribute& newAt, Bool permanent)
void addRestrictions(AttributeBuffer& newBuf)
void setRestriction(Attribute& newAt)
void setRestrictions(AttributeBuffer& newBuf)
void removeRestriction(const String& name)
Bool existRestriction(const String& name)
void clearRestrictions()
Bool matches(Attribute& at)
Bool matches(AttributeBuffer& atBuf)
Protected Members
DisplayMethod()
DisplayMethod(const DisplayMethod &other)
void operator=(const DisplayMethod &other)
DisplayData *parentDisplayData()

Description

Synopsis

This base class defines an interface for drawing a single view of a DisplayData object. The fundamental idea is that a DisplayData class will manage one or more DisplayMethod objects, and request the individual objects to draw as necessary.

Member Description

DisplayMethod(DisplayData *parentDisplayData)

Constructor. DisplayMethods need to know who their parent DisplayData is.

virtual ~DisplayMethod()

Destructor.

virtual void draw(Display::RefreshReason reason, WorldCanvasHolder &wcHolder) = 0

Draw on the provided WorldCanvasHolder.

virtual void cleanup()

clear drawlist state. dk note 11/03: Only used by the PrincipleAxesDM branch, where the implementation has been moved. Implementation should remain null on the CachingDD/DM branch, which uses different interface (purgeCache) and state for this.

void addRestriction(Attribute& newAt, Bool permanent)
void addRestrictions(AttributeBuffer& newBuf)
void setRestriction(Attribute& newAt)
void setRestrictions(AttributeBuffer& newBuf)
void removeRestriction(const String& name)
Bool existRestriction(const String& name)
void clearRestrictions()

Set & remove restrictions

Bool matches(Attribute& at)
Bool matches(AttributeBuffer& atBuf)

match restriction

DisplayMethod()

(Required) default constructor.

DisplayMethod(const DisplayMethod &other)

(Required) copy constructor.

void operator=(const DisplayMethod &other)

(Required) copy assignment.

DisplayData *parentDisplayData()

Return the parent DisplayData.