DM_icon
List of: Classes
Subjects: Deformable Modeling
Contents: Standalone Deformable Modeling

Purpose: This class provides abstract notify methods to the deformable modeling kernel for drawing services.

Derivation: DM_icon : -

Filename: ds/dshusk/dskernel/dmicon.hxx

Description: The contract with the DM_icon class gives the deformable modeling kernel three responsibilities. First, DM_icon objects are owned by tag objects: they are created by the tag object CTOR and destroyed by the tag object DTOR. This is supported by the DM_iconMake_copy and Lose methods.


Second, the deformable modeling kernel calls the icon Set_owner method when the tag object is fully constructed. This allows the icon to initialize itself, and retain knowledge of its owner. Third, the kernel calls the icon Tagobject_changed method to notify the icon when the tag object state has changed, e.g., geometry or behavior. The icon can then redraw, or set a flag for lazy update.


The deformable modeling kernel also defines a command object interface which allows an application to broadcast commands to all or selected icons in a deformable modeling hierarchy. These are supported by the DM_iconDraw and Set_state methods.


Related classes: Implementations derived from the DM_icon class must support the DM_icon_factory class by overriding the Lose and Make_copy methods. Implementations overriding the Draw method, Set_state method, and the Query method must also override the DM_icon_draw_args, the DM_icon_cmd_args, and the DM_icon_query_args classes respectively.

References: by DS DM_default_icon_factory, DS_dmod

Constructor: protected: DM_icon::DM_icon ();


Default constructor.




Destructor: public: virtual void DM_icon::Lose ()=0;


Public destructor.






protected: virtual DM_icon::~DM_icon ();


Destructor.



Methods: public: virtual void DM_icon::Draw (


Spatial_abs_hurler&, // error handler


const DM_icon_draw_args& // draw-command object


) const=0;


Draw this icon.






public: virtual void DM_icon::Get_owner (


DS_dmod*& dmod, // icon owner ID


int& tag // icon owner ID


) const=0;


Icon owner query.






public: virtual DM_icon* DM_icon::Make_copy (


Spatial_abs_hurler& // error handler


) const=0;


Makes a copy of the icon.






public: virtual void DM_icon::Query (


Spatial_abs_hurler&, // error handler


DM_icon_query_args& // query object


) const=0;


Query and return the result in the arguments.






public: virtual void DM_icon::Set_owner (


Spatial_abs_hurler&, // error handler


DS_dmod* new_dmod, // icon owner ID


int new_tag // icon owner ID


)=0;


Notification of owner completion. Notification of owner completion, for icon initialization.






public: virtual void DM_icon::Set_state (


Spatial_abs_hurler&, // error handler


const DM_icon_cmd_args& // command object


)=0;


Execute command.






public: virtual void DM_icon::Tag_object_changed (


Spatial_abs_hurler& // error handler


)=0;


Notification of owning tag object state change.
PDF/DS/06CL.PDF
HTM/DATA/DS/DS/06CL/0023.HTM