#include <gen.h>


Public Member Functions | |
| a2dNamedProperty () | |
| Default constructor. | |
| a2dNamedProperty (const a2dPropertyId *id) | |
| Constructor giving an id. | |
| a2dNamedProperty (const a2dNamedProperty &other) | |
| Copy constructor. | |
| virtual a2dNamedProperty * | Clone (a2dObject::CloneOptions options) const =0 |
| Virtual copy constructor. | |
| virtual void | Assign (const a2dNamedProperty &other)=0 |
| Virtual assignment operator. | |
| virtual | ~a2dNamedProperty () |
| Destructor. | |
| void | SetToObject (a2dObject *obj, a2dPropertyId::SetFlags setflags=a2dPropertyId::set_none) |
| Set this property to an object. | |
| void | SetToObjectClone (a2dObject *obj, a2dPropertyId::SetFlags setflags=a2dPropertyId::set_none) const |
| Set this property to an object and clone it if neccessary. | |
| const a2dPropertyId * | GetId () const |
| Get the a2dPropertyId object identifying this property. | |
| wxString | GetName () const |
| Get the name of the a2dPropertyId object. | |
| virtual wxString | GetString () const |
| when a2dStringProperty, return its value else assert | |
| virtual double | GetDouble () const |
| when a2dDoubleProperty, return its value else assert | |
| virtual float | GetFloat () const |
| when a2dFloatProperty, return its value else assert | |
| virtual bool | GetBool () const |
| when a2dBoolProperty, return its value else assert | |
| virtual wxInt16 | GetInt16 () const |
| when a2dInt16Property, return its value else assert | |
| virtual wxUint16 | GetUint16 () const |
| when a2dUint16Property, return its value else assert | |
| virtual wxInt32 | GetInt32 () const |
| when a2dInt32Property, return its value else assert | |
| virtual wxUint32 | GetUint32 () const |
| when a2dUint32Property, return its value else assert | |
| virtual void * | GetVoidPtr () const |
| when a2dVoidPtrProperty, return its value else assert | |
| virtual a2dObject * | GetRefObject () const |
| when a2dProperty, return its value else assert | |
| virtual a2dObject * | GetRefObjectNA () const |
| when a2dProperty, return its value else return NULL | |
| virtual wxString | StringRepresentation () const |
| virtual wxString | StringValueRepresentation () const |
| virtual bool | GetVisible () const |
| some derived properties can be visible or not and override this | |
| virtual bool | GetCanRender () const |
| some derived properties can be renderable or not and override this | |
| double | ParseDouble (unsigned int &position) |
| parse a double from the value string | |
| void | SkipCommaSpaces (unsigned int &position) |
| parse comma, whitespace and skip it form teh value string | |
| void | SkipSpaces (unsigned int &position) |
| parse whitespace and skip it form teh value string | |
| void | Walker (wxObject *parent, a2dWalkerIOHandler &handler) |
| This is used to recursively walk through an object tree. | |
| virtual void | DoWalker (wxObject *parent, a2dWalkerIOHandler &handler) |
| virtual void | Save (wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dObjectList *towrite) |
| write all needed to an XML type of file called the CVG format | |
| virtual void | Load (wxObject *parent, a2dIOHandlerXmlSerIn &parser) |
| load object from CVG file | |
| virtual void | DoSave (wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite) |
| Save settings. | |
| virtual void | DoLoad (wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts) |
| Load settings. | |
Protected Attributes | |
| const a2dPropertyId * | m_id |
| The property id object identifying this property. | |
Friends | |
| class | a2dPropertyId |
| wxProperty is a friend and allowed to use these functions | |
In general derived objects of this class are added as properties to a a2dPropObject. You can store/wrap almost any information you like in a property. The purpose is mainly to allow users of the library to attach extra information to an object, without the need to extend the object with C++ members. The properties are dynamic, and space needed for them is freed when the property is removed. This keeps classes small since all extra information needed for editing an object are whatever, can be stored via the property system, as soon as the action is finished all extra data can be removed again.
There are many ways to use the properties. But the important thing is to understand that a2dNamedProperties instances are made unique in type of info and purpose by its a2dPropertyId. A specific derived a2dNamedProperty, containing some data, does have a a2dPropertyId set to it on creation. This id is like a unique application broad name for this a2dNamedProperty. The type of id can only be used in conbination with that type of a2dNamedProperty. Normally you add specific a2dPropertyId instances to a a2dPropObject as static members, which defines which properties can be set to the object.
class a2dNamedProperty_X has a one to relation to a class a2dPropertyId_Y. There can be many instances of a2dNamedProperty_X all with instantiated with different instances of that a2dPropertyId_Y.
Properties are chained via its next member.
see a2dPropObject
Definition at line 1037 of file gen.h.
| void a2dNamedProperty::SetToObject | ( | a2dObject * | obj, | |
| a2dPropertyId::SetFlags | setflags = a2dPropertyId::set_none | |||
| ) | [inline] |
| void a2dNamedProperty::SetToObjectClone | ( | a2dObject * | obj, | |
| a2dPropertyId::SetFlags | setflags = a2dPropertyId::set_none | |||
| ) | const [inline] |
| virtual wxString a2dNamedProperty::StringRepresentation | ( | ) | const [inline, virtual] |
Convert the property to a string, used to serialize class. Override to define it for your properties.
Reimplemented in a2dBoolProperty, a2dStringProperty, a2dVoidPtrProperty, a2dProperty, a2dAutoZeroProperty, a2dInt16Property, a2dUint16Property, a2dInt32Property, a2dUint32Property, a2dDoubleProperty, a2dFloatProperty, a2dArrayStringProperty, a2dFileNameProperty, a2dDateTimeProperty, a2dPathListProperty, a2dColourProperty, a2dMatrixProperty, a2dPoint2DProperty, a2dFillProperty, a2dStrokeProperty, a2dFontProperty, a2dStyleProperty, and a2dBoudingBoxProperty.
| virtual wxString a2dNamedProperty::StringValueRepresentation | ( | ) | const [inline, virtual] |
Convert the property value to a string, used to serialize class. Override to define it for your properties.
Reimplemented in a2dBoolProperty, a2dStringProperty, a2dVoidPtrProperty, a2dProperty, a2dAutoZeroProperty, a2dInt16Property, a2dUint16Property, a2dInt32Property, a2dUint32Property, a2dDoubleProperty, a2dFloatProperty, a2dArrayStringProperty, a2dFileNameProperty, a2dDateTimeProperty, a2dPathListProperty, a2dColourProperty, a2dMatrixProperty, a2dPoint2DProperty, a2dFillProperty, a2dStrokeProperty, a2dFontProperty, a2dStyleProperty, and a2dBoudingBoxProperty.
| virtual bool a2dNamedProperty::GetCanRender | ( | ) | const [inline, virtual] |
some derived properties can be renderable or not and override this
some properties have a reference to a a2dCanvasObject, but only to store it, not to render it as part of the object.
a2dPropertyId of a property normally decides if this specific property is to be rendered or not.
Reimplemented in a2dCanvasObjectPtrProperty, and a2dClipPathProperty.
| void a2dNamedProperty::Save | ( | wxObject * | parent, | |
| a2dIOHandlerXmlSerOut & | out, | |||
| a2dObjectList * | towrite | |||
| ) | [virtual] |
| void a2dNamedProperty::Load | ( | wxObject * | parent, | |
| a2dIOHandlerXmlSerIn & | parser | |||
| ) | [virtual] |