|
wxArt2D
|
This template class is for property ids meant for properties that do not encapsulate another type. More...
#include <id.h>


Public Member Functions | |
| a2dPropertyIdProp (const wxString &name, Flags flags) | |
| Default constructor. | |
| void | SetPropertyToObject (a2dObject *obj, const proptype &value) const |
| Set the property in obj to value (cloning value) | |
| void | SetPropertyToObject (a2dObject *obj, proptype *value) const |
| Set the property in obj to value (not cloning value) | |
| proptype * | GetPropertyClone (const a2dObject *obj) const |
| retrieve in form of a a2dNamedProperty the value of the property identified with this id More... | |
| a2dNamedProperty * | GetPropertyAsNamedProperty (const a2dObject *obj) const |
| retrieve in form of a a2dNamedProperty the property identified with this id More... | |
| void | SetNamedPropertyToObject (a2dObject *obj, a2dNamedProperty *nprop, SetFlags setflags=set_none) const |
| Set the property in obj to value (not cloning value) | |
| proptype * | GetProperty (a2dObject *obj) const |
| Get the property in obj (not cloned) | |
| const proptype * | GetProperty (const a2dObject *obj) const |
| Get the property in obj (const, not cloned) | |
Public Member Functions inherited from a2dPropertyId | |
| a2dPropertyId (const wxString &name, Flags flags) | |
| Default constructor. | |
| virtual | ~a2dPropertyId () |
| destructor | |
| virtual wxString | GetName () const |
| Get the ids print and serialization name. | |
| void | SetName (const wxString &name) |
| Set the ids print and serialization name. | |
| virtual const a2dPropertyId * | GetMainID () const |
| Get the main (pre-dot) part of a hierarchical id. | |
| virtual const a2dPropertyId * | GetSubID () const |
| Get the sub (post-dot) part of a hierarchical id. | |
| virtual bool | operator== (const a2dPropertyId &other) const |
| Check if this id is equal to another id. | |
| virtual a2dNamedProperty * | CreatePropertyFromString (const wxString &value) const |
| Create a new property object from a value string. | |
| bool | IsCloneDeep () const |
| Test if this id identifies a property that needs to be cloned deep. | |
| bool | IsTemporary () const |
| Test if this id identifies a temporary property. | |
| bool | IsTransfer () const |
| true if this property is transfered via e.g. a command processor | |
| bool | IsOnlyMember () const |
| true if this property is only set as member | |
| bool | IsOnlyMemberHint () const |
| true if this property has the only set as member hint set | |
| bool | IsListFirst () const |
| true if this property searches the list first, then members | |
| bool | IsListOnly () const |
| true if this property searches the list only | |
| bool | IsUserDefined () const |
| true if this property is user defined | |
| bool | IsEditable () const |
| true if this property is editable ( can be tested in a property editor ). | |
| bool | CheckFlags (Flags flags) const |
| check a flag mask (all given flags must be set) | |
| bool | CheckCollect (const a2dPropertyId *id, Flags flags) const |
| check a property id and flags to see if the property shall be collected | |
| void | RemovePropertyFromObject (a2dObject *obj) const |
| Dynamic properties with this id will be removed from the object. More... | |
Protected Member Functions | |
| a2dPropertyIdProp () | |
| this constructor is only for property ids referencing other property ids | |
Protected Member Functions inherited from a2dPropertyId | |
| a2dPropertyId () | |
| this constructor is only for property ids referencing other property ids | |
| void | DoAddPropertyToObject (a2dObject *obj, a2dNamedProperty *prop) const |
| this is called by derived classes to add a list property in an object More... | |
| bool | DoIgnoreIfNotMember (a2dObject *obj) const |
| this is called by derived to check if a property should be added as non-member More... | |
Additional Inherited Members | |
Public Types inherited from a2dPropertyId | |
| enum | Flags { flag_none = 0x00000000, flag_temporary = 0x00000001, flag_transfer = 0x00000002, flag_onlymember = 0x00000004, flag_onlymemberhint = 0x00000008, flag_listfirst = 0x00000010, flag_multiple = 0x00000020, flag_clonedeep = 0x00000040, flag_listonly = 0x00000080, flag_norender = 0x00000100, flag_userDefined = 0x00000200, flag_isEditable = 0x00000400, flag_notify = 0x00000800 } |
| Flags for property ids. More... | |
| enum | SetFlags { set_none = 0x00000000, set_onlymember = 0x00000010, set_remove_non_member = 0x00000020, set_remove_property = 0x00000040 } |
| Flags used for manipulating the way a property is set to a2dObject. More... | |
Static Protected Member Functions inherited from a2dPropertyId | |
| static void | DoSetPropertyId (a2dNamedProperty *prop, a2dPropertyId *id) |
| this is called by derived classes to change an id in a property More... | |
Protected Attributes inherited from a2dPropertyId | |
| wxString | m_name |
| Flags | m_flags |
This template class is for property ids meant for properties that do not encapsulate another type.
For some properties, the property itself is the value. These properties use a2dPropertyIdProp as id. Other properties encapsulate a value. These properties use wxProperyIdTyped as id.
For example, a2dShadowStyleProperty is a property which is normally added as a dynamic property to an a2dCanvasObject. It directly holds the information/value for shadow in its members. So we will use: typedef a2dPropertyIdProp<class a2dShadowStyleProperty> a2dPropertyIdCanvasShadowStyle;
If however the property is just holding a single object, it is more handy to use a2dPropertyIdTyped as template, since this has many function to get/set that object without further effort. So for a a2dBoundingBox in a a2dBoudingBoxProperty it is best to use this: typedef a2dPropertyIdTyped<a2dBoundingBox, a2dBoudingBoxProperty> a2dPropertyIdBoundingBox;
|
virtual |
retrieve in form of a a2dNamedProperty the property identified with this id
The property id is defining the way a a2dNamedProperty can be set or retrieved from the a2dObject. The a2dPropertyIdProp is only used for dynamic properties.
| obj | the object on which the property needs to be set ot retrieved |
Reimplemented from a2dPropertyId.
| proptype * a2dPropertyIdProp< proptype >::GetPropertyClone | ( | const a2dObject * | obj | ) | const |
retrieve in form of a a2dNamedProperty the value of the property identified with this id
The property id is defining the way a a2dNamedProperty can be set or retrieved from the a2dObject. In this class only via dynamic properties.
| obj | the object on which the property needs to be retrieved |