#include <wx/wx.h>
#include <wx/hashmap.h>
#include <wx/xml/xml.h>
#include <wx/tokenzr.h>
#include <wx/list.h>
#include <wx/wxxmlserializer/Defs.h>
Classes | |
class | xsPropertyIO |
Base class encapsulating a property I/O handler. The class is used by the xsSerializable class and is responsiblefor reading and writing of an XML node containing property information. Each supported property (data) type should have its own I/O handler class. Moreover, all derived classes must provide public functions 'static wxString classname::ToString(datatype value)' and 'static datatype classname:: FromString( const wxString& value )' responsible for conversion between datatype and and its string representation (these functions are used internally by class virtual functions. More... | |
Defines | |
#define | XS_DECLARE_IO_HANDLER(datatype, name) |
Macro suitable for declaration of new property I/O handler. | |
#define | XS_DECLARE_EXPORTED_IO_HANDLER(datatype, name, decoration) |
Macro suitable for declaration of exported new property I/O handler. | |
#define | XS_DEFINE_IO_HANDLER(datatype, name) |
Macro suitable for implementation of new property I/O handler. | |
Functions | |
WX_DECLARE_OBJARRAY_WITH_DECL (wxRealPoint, RealPointArray, class WXDLLIMPEXP_XS) | |
WX_DECLARE_LIST_WITH_DECL (wxRealPoint, RealPointList, class WXDLLIMPEXP_XS) | |
WX_DEFINE_USER_EXPORTED_ARRAY_CHAR (char, CharArray, class WXDLLIMPEXP_XS) | |
WX_DEFINE_USER_EXPORTED_ARRAY_INT (int, IntArray, class WXDLLIMPEXP_XS) | |
WX_DEFINE_USER_EXPORTED_ARRAY_LONG (long, LongArray, class WXDLLIMPEXP_XS) | |
WX_DEFINE_USER_EXPORTED_ARRAY_DOUBLE (double, DoubleArray, class WXDLLIMPEXP_XS) | |
WX_DECLARE_STRING_HASH_MAP_WITH_DECL (wxString, StringMap, class WXDLLIMPEXP_XS) | |
XS_DECLARE_EXPORTED_IO_HANDLER (wxString, xsStringPropIO, WXDLLIMPEXP_XS) | |
Property class encapsulating I/O functions used by 'wxString' properties. | |
XS_DECLARE_EXPORTED_IO_HANDLER (wxChar, xsCharPropIO, WXDLLIMPEXP_XS) | |
Property class encapsulating I/O functions used by 'wxChar' properties. | |
XS_DECLARE_EXPORTED_IO_HANDLER (long, xsLongPropIO, WXDLLIMPEXP_XS) | |
Property class encapsulating I/O functions used by 'long' properties. | |
XS_DECLARE_EXPORTED_IO_HANDLER (int, xsIntPropIO, WXDLLIMPEXP_XS) | |
Property class encapsulating I/O functions used by 'int' properties. | |
XS_DECLARE_EXPORTED_IO_HANDLER (bool, xsBoolPropIO, WXDLLIMPEXP_XS) | |
Property class encapsulating I/O functions used by 'bool' properties. | |
XS_DECLARE_EXPORTED_IO_HANDLER (double, xsDoublePropIO, WXDLLIMPEXP_XS) | |
Property class encapsulating I/O functions used by 'double' properties. | |
XS_DECLARE_EXPORTED_IO_HANDLER (float, xsFloatPropIO, WXDLLIMPEXP_XS) | |
Property class encapsulating I/O functions used by 'float' properties. | |
XS_DECLARE_EXPORTED_IO_HANDLER (wxPoint, xsPointPropIO, WXDLLIMPEXP_XS) | |
Property class encapsulating I/O functions used by 'wxPoint' properties. | |
XS_DECLARE_EXPORTED_IO_HANDLER (wxSize, xsSizePropIO, WXDLLIMPEXP_XS) | |
Property class encapsulating I/O functions used by 'wxSize' properties. | |
XS_DECLARE_EXPORTED_IO_HANDLER (wxRealPoint, xsRealPointPropIO, WXDLLIMPEXP_XS) | |
Property class encapsulating I/O functions used by 'wxRealPoint' properties. | |
XS_DECLARE_EXPORTED_IO_HANDLER (wxColour, xsColourPropIO, WXDLLIMPEXP_XS) | |
Property class encapsulating I/O functions used by 'wxColour' properties. | |
XS_DECLARE_EXPORTED_IO_HANDLER (wxPen, xsPenPropIO, WXDLLIMPEXP_XS) | |
Property class encapsulating I/O functions used by 'wxPen' properties. | |
XS_DECLARE_EXPORTED_IO_HANDLER (wxBrush, xsBrushPropIO, WXDLLIMPEXP_XS) | |
Property class encapsulating I/O functions used by 'wxBrush' properties. | |
XS_DECLARE_EXPORTED_IO_HANDLER (wxFont, xsFontPropIO, WXDLLIMPEXP_XS) | |
Property class encapsulating I/O functions used by 'wxFont' properties. | |
XS_DECLARE_EXPORTED_IO_HANDLER (wxArrayString, xsArrayStringPropIO, WXDLLIMPEXP_XS) | |
Property class encapsulating I/O functions used by 'wxArrayString' properties. | |
XS_DECLARE_EXPORTED_IO_HANDLER (CharArray, xsArrayCharPropIO, WXDLLIMPEXP_XS) | |
Property class encapsulating I/O functions used by 'CharArray' properties. | |
XS_DECLARE_EXPORTED_IO_HANDLER (IntArray, xsArrayIntPropIO, WXDLLIMPEXP_XS) | |
Property class encapsulating I/O functions used by 'IntArray' properties. | |
XS_DECLARE_EXPORTED_IO_HANDLER (LongArray, xsArrayLongPropIO, WXDLLIMPEXP_XS) | |
Property class encapsulating I/O functions used by 'LongArray' properties. | |
XS_DECLARE_EXPORTED_IO_HANDLER (DoubleArray, xsArrayDoublePropIO, WXDLLIMPEXP_XS) | |
Property class encapsulating I/O functions used by 'DoubleArray' properties. | |
XS_DECLARE_EXPORTED_IO_HANDLER (RealPointArray, xsArrayRealPointPropIO, WXDLLIMPEXP_XS) | |
Property class encapsulating I/O functions used by 'RealPointArray' (array of integer values) properties. | |
XS_DECLARE_EXPORTED_IO_HANDLER (RealPointList, xsListRealPointPropIO, WXDLLIMPEXP_XS) | |
Property class encapsulating I/O functions used by 'ListRealPoint' (list of wxRealPoint objects) properties. | |
XS_DECLARE_EXPORTED_IO_HANDLER (xsSerializable, xsDynObjPropIO, WXDLLIMPEXP_XS) | |
Property class encapsulating I/O functions used by 'serializabledynamic' (xsSerializable dynamic class objects which are created during the deserialization process) properties. | |
XS_DECLARE_EXPORTED_IO_HANDLER (xsSerializable, xsDynNCObjPropIO, WXDLLIMPEXP_XS) | |
Property class encapsulating I/O functions used by 'serializabledynamicnocreate' (already existing xsSerializable dynamic class objects) properties. | |
XS_DECLARE_EXPORTED_IO_HANDLER (xsSerializable, xsStaticObjPropIO, WXDLLIMPEXP_XS) | |
Property class encapsulating I/O functions used by 'serializablestatic' (static xsSerializable class objects) properties. | |
XS_DECLARE_EXPORTED_IO_HANDLER (StringMap, xsMapStringPropIO, WXDLLIMPEXP_XS) | |
Property class encapsulating I/O functions used by 'mapstring' (string hash map) properties. | |
WX_DECLARE_HASH_MAP (wxString, xsPropertyIO *, wxStringHash, wxStringEqual, PropertyIOMap) | |
Variables | |
class WXDLLIMPEXP_XS | xsProperty |
class WXDLLIMPEXP_XS | xsSerializable |
#define XS_DECLARE_EXPORTED_IO_HANDLER | ( | datatype, | |||
name, | |||||
decoration | ) |
class decoration name : public xsPropertyIO \ { \ public: \ DECLARE_DYNAMIC_CLASS(name); \ name(){;} \ virtual ~name(){;} \ \ virtual void Read(xsProperty *property, wxXmlNode *source); \ virtual void Write(xsProperty *property, wxXmlNode *target); \ virtual wxString GetValueStr(xsProperty *property); \ virtual void SetValueStr(xsProperty *property, const wxString& valstr); \ static wxString ToString(const datatype& value); \ static datatype FromString(const wxString& value); \ }; \
Macro suitable for declaration of exported new property I/O handler.
datatype | Property's data type | |
name | Handler class name | |
decoration | Class decoration |
#define XS_DECLARE_IO_HANDLER | ( | datatype, | |||
name | ) |
class name : public xsPropertyIO \ { \ public: \ DECLARE_DYNAMIC_CLASS(name); \ name(){;} \ virtual ~name(){;} \ \ virtual void Read(xsProperty *property, wxXmlNode *source); \ virtual void Write(xsProperty *property, wxXmlNode *target); \ virtual wxString GetValueStr(xsProperty *property); \ virtual void SetValueStr(xsProperty *property, const wxString& valstr); \ static wxString ToString(const datatype& value); \ static datatype FromString(const wxString& value); \ }; \
Macro suitable for declaration of new property I/O handler.
datatype | Property's data type | |
name | Handler class name |
#define XS_DEFINE_IO_HANDLER | ( | datatype, | |||
name | ) |
IMPLEMENT_DYNAMIC_CLASS(name, xsPropertyIO); \ \ void name::Read(xsProperty *property, wxXmlNode *source) \ { \ *((datatype*)property->m_pSourceVariable) = FromString(source->GetNodeContent()); \ } \ \ void name::Write(xsProperty *property, wxXmlNode *target) \ { \ wxString val = ToString(*((datatype*)property->m_pSourceVariable)); \ \ if(val != property->m_sDefaultValueStr) \ { \ wxXmlNode *newNode = AddPropertyNode(target, wxT("property"), val); \ AppendPropertyType(property, newNode); \ } \ } \ \ wxString name::GetValueStr(xsProperty *property) \ { \ return ToString(*((datatype*)property->m_pSourceVariable)); \ } \ \ void name::SetValueStr(xsProperty *property, const wxString& valstr) \ { \ *((datatype*)property->m_pSourceVariable) = FromString(valstr); \ } \
Macro suitable for implementation of new property I/O handler.
datatype | Property's data type | |
name | Handler class name |
WX_DECLARE_HASH_MAP | ( | wxString | , | |
xsPropertyIO * | , | |||
wxStringHash | , | |||
wxStringEqual | , | |||
PropertyIOMap | ||||
) |
WX_DECLARE_LIST_WITH_DECL | ( | wxRealPoint | , | |
RealPointList | , | |||
class WXDLLIMPEXP_XS | ||||
) |
WX_DECLARE_OBJARRAY_WITH_DECL | ( | wxRealPoint | , | |
RealPointArray | , | |||
class WXDLLIMPEXP_XS | ||||
) |
WX_DECLARE_STRING_HASH_MAP_WITH_DECL | ( | wxString | , | |
StringMap | , | |||
class WXDLLIMPEXP_XS | ||||
) |
WX_DEFINE_USER_EXPORTED_ARRAY_CHAR | ( | char | , | |
CharArray | , | |||
class WXDLLIMPEXP_XS | ||||
) |
WX_DEFINE_USER_EXPORTED_ARRAY_DOUBLE | ( | double | , | |
DoubleArray | , | |||
class WXDLLIMPEXP_XS | ||||
) |
WX_DEFINE_USER_EXPORTED_ARRAY_INT | ( | int | , | |
IntArray | , | |||
class WXDLLIMPEXP_XS | ||||
) |
WX_DEFINE_USER_EXPORTED_ARRAY_LONG | ( | long | , | |
LongArray | , | |||
class WXDLLIMPEXP_XS | ||||
) |
XS_DECLARE_EXPORTED_IO_HANDLER | ( | StringMap | , | |
xsMapStringPropIO | , | |||
WXDLLIMPEXP_XS | ||||
) |
Property class encapsulating I/O functions used by 'mapstring' (string hash map) properties.
XS_DECLARE_EXPORTED_IO_HANDLER | ( | xsSerializable | , | |
xsStaticObjPropIO | , | |||
WXDLLIMPEXP_XS | ||||
) |
Property class encapsulating I/O functions used by 'serializablestatic' (static xsSerializable class objects) properties.
XS_DECLARE_EXPORTED_IO_HANDLER | ( | xsSerializable | , | |
xsDynNCObjPropIO | , | |||
WXDLLIMPEXP_XS | ||||
) |
Property class encapsulating I/O functions used by 'serializabledynamicnocreate' (already existing xsSerializable dynamic class objects) properties.
XS_DECLARE_EXPORTED_IO_HANDLER | ( | xsSerializable | , | |
xsDynObjPropIO | , | |||
WXDLLIMPEXP_XS | ||||
) |
Property class encapsulating I/O functions used by 'serializabledynamic' (xsSerializable dynamic class objects which are created during the deserialization process) properties.
XS_DECLARE_EXPORTED_IO_HANDLER | ( | RealPointList | , | |
xsListRealPointPropIO | , | |||
WXDLLIMPEXP_XS | ||||
) |
Property class encapsulating I/O functions used by 'ListRealPoint' (list of wxRealPoint objects) properties.
XS_DECLARE_EXPORTED_IO_HANDLER | ( | RealPointArray | , | |
xsArrayRealPointPropIO | , | |||
WXDLLIMPEXP_XS | ||||
) |
Property class encapsulating I/O functions used by 'RealPointArray' (array of integer values) properties.
XS_DECLARE_EXPORTED_IO_HANDLER | ( | DoubleArray | , | |
xsArrayDoublePropIO | , | |||
WXDLLIMPEXP_XS | ||||
) |
Property class encapsulating I/O functions used by 'DoubleArray' properties.
XS_DECLARE_EXPORTED_IO_HANDLER | ( | LongArray | , | |
xsArrayLongPropIO | , | |||
WXDLLIMPEXP_XS | ||||
) |
Property class encapsulating I/O functions used by 'LongArray' properties.
XS_DECLARE_EXPORTED_IO_HANDLER | ( | IntArray | , | |
xsArrayIntPropIO | , | |||
WXDLLIMPEXP_XS | ||||
) |
Property class encapsulating I/O functions used by 'IntArray' properties.
XS_DECLARE_EXPORTED_IO_HANDLER | ( | CharArray | , | |
xsArrayCharPropIO | , | |||
WXDLLIMPEXP_XS | ||||
) |
Property class encapsulating I/O functions used by 'CharArray' properties.
XS_DECLARE_EXPORTED_IO_HANDLER | ( | wxArrayString | , | |
xsArrayStringPropIO | , | |||
WXDLLIMPEXP_XS | ||||
) |
Property class encapsulating I/O functions used by 'wxArrayString' properties.
XS_DECLARE_EXPORTED_IO_HANDLER | ( | wxFont | , | |
xsFontPropIO | , | |||
WXDLLIMPEXP_XS | ||||
) |
Property class encapsulating I/O functions used by 'wxFont' properties.
XS_DECLARE_EXPORTED_IO_HANDLER | ( | wxBrush | , | |
xsBrushPropIO | , | |||
WXDLLIMPEXP_XS | ||||
) |
Property class encapsulating I/O functions used by 'wxBrush' properties.
XS_DECLARE_EXPORTED_IO_HANDLER | ( | wxPen | , | |
xsPenPropIO | , | |||
WXDLLIMPEXP_XS | ||||
) |
Property class encapsulating I/O functions used by 'wxPen' properties.
XS_DECLARE_EXPORTED_IO_HANDLER | ( | wxColour | , | |
xsColourPropIO | , | |||
WXDLLIMPEXP_XS | ||||
) |
Property class encapsulating I/O functions used by 'wxColour' properties.
XS_DECLARE_EXPORTED_IO_HANDLER | ( | wxRealPoint | , | |
xsRealPointPropIO | , | |||
WXDLLIMPEXP_XS | ||||
) |
Property class encapsulating I/O functions used by 'wxRealPoint' properties.
XS_DECLARE_EXPORTED_IO_HANDLER | ( | wxSize | , | |
xsSizePropIO | , | |||
WXDLLIMPEXP_XS | ||||
) |
Property class encapsulating I/O functions used by 'wxSize' properties.
XS_DECLARE_EXPORTED_IO_HANDLER | ( | wxPoint | , | |
xsPointPropIO | , | |||
WXDLLIMPEXP_XS | ||||
) |
Property class encapsulating I/O functions used by 'wxPoint' properties.
XS_DECLARE_EXPORTED_IO_HANDLER | ( | float | , | |
xsFloatPropIO | , | |||
WXDLLIMPEXP_XS | ||||
) |
Property class encapsulating I/O functions used by 'float' properties.
XS_DECLARE_EXPORTED_IO_HANDLER | ( | double | , | |
xsDoublePropIO | , | |||
WXDLLIMPEXP_XS | ||||
) |
Property class encapsulating I/O functions used by 'double' properties.
XS_DECLARE_EXPORTED_IO_HANDLER | ( | bool | , | |
xsBoolPropIO | , | |||
WXDLLIMPEXP_XS | ||||
) |
Property class encapsulating I/O functions used by 'bool' properties.
XS_DECLARE_EXPORTED_IO_HANDLER | ( | int | , | |
xsIntPropIO | , | |||
WXDLLIMPEXP_XS | ||||
) |
Property class encapsulating I/O functions used by 'int' properties.
XS_DECLARE_EXPORTED_IO_HANDLER | ( | long | , | |
xsLongPropIO | , | |||
WXDLLIMPEXP_XS | ||||
) |
Property class encapsulating I/O functions used by 'long' properties.
XS_DECLARE_EXPORTED_IO_HANDLER | ( | wxChar | , | |
xsCharPropIO | , | |||
WXDLLIMPEXP_XS | ||||
) |
Property class encapsulating I/O functions used by 'wxChar' properties.
XS_DECLARE_EXPORTED_IO_HANDLER | ( | wxString | , | |
xsStringPropIO | , | |||
WXDLLIMPEXP_XS | ||||
) |
Property class encapsulating I/O functions used by 'wxString' properties.
class WXDLLIMPEXP_XS xsProperty |
class WXDLLIMPEXP_XS xsSerializable |