20 #ifndef __WXDOCPROP_H__
21 #define __WXDOCPROP_H__
27 #include "wx/filename.h"
28 #include "wx/colour.h"
31 #include <wx/mstream.h>
39 #if defined(__VISUALC__) && (_MSC_VER <= 1300)
40 #define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
41 #define _CRT_SECURE_NO_DEPRECATE 1
47 #if wxUSE_STD_IOSTREAM
48 #include <wx/ioswrap.h>
51 #include <wx/txtstrm.h>
64 #include "wx/wfstream.h"
65 #include <wx/sstream.h>
66 #include <wx/txtstrm.h>
71 #if wxCHECK_VERSION(2, 5, 0)
72 #define wxDynamicCast(obj, className) \
73 ((className *) wxCheckDynamicCast(const_cast<className*>(static_cast<const className*>(obj)), &className::ms_classInfo))
75 #define wxDynamicCast(obj, className) \
76 ((className *) wxCheckDynamicCast(const_cast<className*>(static_cast<const className*>(obj)), &className::sm_class##className))
85 inline void* wxCheckCastFixed(
void* ptr )
87 wxASSERT_MSG( ptr, _T(
"wxStaticCast() used incorrectly" ) );
90 #define wxStaticCast(obj, className) \
91 ((className *)wxCheckCastFixed(wxDynamicCast(obj, className)))
93 #define wxStaticCastConst(obj, className) \
94 ((const className *)wxCheckCastFixed(wxDynamicCast(obj, className)))
97 inline wxObject* wxCheckCastNull( wxObject* obj, wxClassInfo* clssInfo )
100 wxASSERT_MSG( wxCheckDynamicCast( obj, clssInfo ), _T(
"wxStaticCast() used incorrectly" ) );
104 #if wxCHECK_VERSION(2, 5, 0)
105 #define wxStaticCastNull(obj, className) \
106 ((className *)wxCheckCastNull(const_cast<wxObject*>(static_cast<const wxObject*>(obj)), &className::ms_classInfo))
108 #define wxStaticCastNull(obj, className) \
109 ((className *)wxCheckCastNull(const_cast<wxObject*>(static_cast<const wxObject*>(obj)), &className::sm_class##className))
113 #if wxCHECK_VERSION(2, 5, 0)
114 #define wxStaticCastTmpl(obj, className) wxStaticCast(obj, className)
115 #define wxStaticCastNullTmpl(obj, className) wxStaticCastNull(obj, className)
117 #define wxStaticCastTmpl(obj, className) ((className *)(wxObject*)(obj))
118 #define wxStaticCastNullTmpl(obj, className) ((className *)(wxObject*)(obj))
121 #else // !__WXDEBUG__
123 #define wxStaticCast(obj, className) ((className *)(wxObject*)(obj))
124 #define wxStaticCastConst(obj, className) ((const className *)(wxObject*)(obj))
125 #define wxStaticCastNull(obj, className) ((className *)(wxObject*)(obj))
126 #define wxStaticCastTmpl(obj, className) ((className *)(wxObject*)(obj))
127 #define wxStaticCastNullTmpl(obj, className) ((className *)(wxObject*)(obj))
129 #endif // __WXDEBUG__
134 a2dVersNo(
int major = 0,
int minor = 0,
int micro = 0)
135 : m_major(major), m_minor(minor), m_micro(micro) {}
136 a2dVersNo(
const wxString& versionString);
138 bool operator==(
const a2dVersNo& rhs )
const;
139 bool operator!=(
const a2dVersNo& rhs )
const {
return !(*
this == rhs); }
140 bool operator>(
const a2dVersNo& rhs )
const;
141 bool operator>=(
const a2dVersNo& rhs )
const;
142 bool operator<(
const a2dVersNo& rhs )
const {
return !(*
this >= rhs); }
143 bool operator<=(
const a2dVersNo& rhs )
const {
return !(*
this > rhs); }
145 int GetMajor()
const {
return m_major; }
146 int GetMinor()
const {
return m_minor; }
147 int GetMicro()
const {
return m_micro; }
163 const wxString& description = wxEmptyString,
164 const wxString& copyright = wxEmptyString)
167 m_vers( major, minor, micro ),
168 m_description( description ),
169 m_copyright( copyright )
173 const wxString& name = wxEmptyString,
174 const wxString& description = wxEmptyString,
175 const wxString& copyright = wxEmptyString)
178 m_vers( versionString ),
179 m_description( description ),
180 m_copyright( copyright )
186 const wxString& GetName()
const {
return m_name; }
188 const a2dVersNo& GetVersion()
const {
return m_vers; }
189 int GetVersionMajor()
const {
return m_vers.GetMajor(); }
190 int GetVersionMinor()
const {
return m_vers.GetMinor(); }
191 int GetVersionMicro()
const {
return m_vers.GetMicro(); }
193 wxString ToString()
const
195 return HasDescription() ? GetDescription() : GetVersionString();
198 wxString GetVersionString()
const
201 str << m_name <<
' ' << m_vers.GetMajor() <<
'.' << m_vers.GetMinor();
202 if ( m_vers.GetMicro() )
203 str <<
'.' << m_vers.GetMicro();
208 bool HasDescription()
const {
return !m_description.empty(); }
209 const wxString& GetDescription()
const {
return m_description; }
211 bool HasCopyright()
const {
return !m_copyright.empty(); }
212 const wxString& GetCopyright()
const {
return m_copyright; }
238 class A2DGENERALDLLEXP a2dResolveIdList;
242 #if wxART2D_USE_CVGIO
254 #endif //wxART2D_USE_CVGIO
262 #include "wx/xrc/xmlres.h"
266 typedef std::map< wxString, a2dError* > a2dErrorHash;
268 typedef std::vector< a2dError > a2dErrorVector;
274 typedef int a2dSignal;
281 a2dEvent(
int id = 0, wxEventType eventType = wxEVT_NULL )
282 : wxEvent(
id, eventType )
287 void SetIntTimeStamp()
289 if ( ms_timestamp == LONG_MAX )
291 SetTimestamp( ++ms_timestamp );
309 BEGIN_DECLARE_EVENT_TYPES()
311 DECLARE_EXPORTED_EVENT_TYPE( A2DGENERALDLLEXP, a2dEVT_COM_EVENT, 1 )
312 END_DECLARE_EVENT_TYPES()
454 a2dComEvent( wxObject* sender,
bool propertyValue, a2dSignal
id );
457 a2dComEvent( wxObject* sender, wxInt16 propertyValue, a2dSignal
id );
460 a2dComEvent( wxObject* sender, wxUint16 propertyValue, a2dSignal
id );
463 a2dComEvent( wxObject* sender, wxInt32 propertyValue, a2dSignal
id );
466 a2dComEvent( wxObject* sender, wxUint32 propertyValue, a2dSignal
id );
469 a2dComEvent( wxObject* sender,
double propertyValue, a2dSignal
id );
472 a2dComEvent( wxObject* sender,
const wxString& propertyValue, a2dSignal
id );
480 wxEvent* Clone(
void )
const;
489 #if defined(_DEBUG) && defined (SMART_POINTER_DEBUG)
512 a2dComEvent* SmrtPtrOwn() { m_refcount++;
return this; }
517 bool SmrtPtrRelease()
520 wxASSERT_MSG( m_refcount >= 0, wxT(
"a2dComEvent Own/Release not matched (extra Release calls)" ) );
521 if ( m_refcount <= 0 )
538 a2dSignal m_comReturn;
544 #if (defined(__WXMSW__) && defined(WXUSINGDLL) )
546 template class A2DGENERALDLLEXP std::allocator<class a2dSmrtPtr<class a2dComEvent> >;
547 template class A2DGENERALDLLEXP std::allocator< std::_List_nod<class a2dSmrtPtr<class a2dComEvent>, std::allocator<class a2dSmrtPtr<class a2dComEvent> > >::_Node >;
548 template class A2DGENERALDLLEXP std::allocator< std::_List_ptr<class a2dSmrtPtr<class a2dComEvent>, std::allocator<class a2dSmrtPtr<class a2dComEvent> > >::_Nodeptr >;
549 template class A2DGENERALDLLEXP std::list<class a2dSmrtPtr<class a2dComEvent> >;
554 typedef void ( wxEvtHandler::*a2dComEventFunction ) (
a2dComEvent& );
556 #define a2dComEventHandler(func) \
557 (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(a2dComEventFunction, &func)
564 #define EVT_COM_EVENT(func) wx__DECLARE_EVT0( a2dEVT_COM_EVENT, a2dComEventHandler( func ))
567 #define EVT_COM_EVENT_ID(id, func) \
568 wx__DECLARE_EVT1( a2dEVT_COM_EVENT, id, a2dComEventHandler( func ))
629 : m_code( a2dError_NoError.GetErrorCode() )
634 a2dError(
const wxString& errorIdName,
const wxString& error = wxEmptyString,
bool warning =
false )
636 if ( errorIdName == wxEmptyString )
637 m_code = wxXmlResource::GetXRCID( wxT(
"a2dError_NoError" ) );
639 m_code = wxXmlResource::GetXRCID( errorIdName );
646 m_code = error.m_code;
647 m_error = error.m_error;
648 m_warning = error.m_warning;
651 bool operator==(
const a2dError& a )
653 return m_code == a.m_code;
656 bool operator!=(
const a2dError& a )
658 return m_code != a.m_code;
663 return a.m_code == b.m_code;
668 return a.m_code != b.m_code;
682 inline void SetErrorCode( a2dErrorWarningCode code ) { m_code = code; }
684 static a2dErrorHash& GetHashMap();
688 wxString m_errorIdName;
697 a2dErrorWarningCode m_code;
705 class A2DGENERALDLLEXP a2dHashMapIntToObject;
706 class A2DGENERALDLLEXP a2dHashMapIntToObject_wxImplementation_HashTable;
707 class A2DGENERALDLLEXP a2dHashMapIntToObject_wxImplementation_KeyEx;
709 class A2DGENERALDLLEXP a2dHashMapCreateObject;
710 class A2DGENERALDLLEXP a2dHashMapCreateObject_wxImplementation_HashTable;
711 class A2DGENERALDLLEXP a2dHashMapCreateObject_wxImplementation_KeyEx;
739 m_mode = mode_a2dObjectSmrtPtr;
741 m_storedHere.m_a2dObjectSmrtPtr = storedHere;
746 m_mode = mode_a2dObjectAutoZeroPtr;
748 m_storedHere.m_a2dObjectAutoZeroPtr = storedHere;
755 m_storedHere.m_link = link;
760 m_mode = mode_inform;
761 m_storedHere.m_inform = inform;
765 bool Assign( a2dObject* ptr );
769 mode_a2dObjectSmrtPtr,
770 mode_a2dObjectAutoZeroPtr,
787 friend class a2dResolveIdList;
791 WX_DECLARE_LIST_WITH_DECL(
a2dResolveIdInfo, a2dResolveIdList,
class A2DGENERALDLLEXP );
795 typedef std::map< wxString, a2dPropertyIdPtr > a2dDynamicIdMap;
812 a2dNamedPropertyList(
const a2dNamedPropertyList& other );
814 ~a2dNamedPropertyList();
819 void RemoveTemporary();
825 #if defined(_DEBUG) && defined (SMART_POINTER_DEBUG)
835 #define DECLARE_PROPERTIES() \
836 static bool InitializePropertyIds();\
837 static a2dDynamicIdMap& GetPropertyIdMap();\
838 static bool AddPropertyId( a2dPropertyId *dynproperty );\
839 virtual bool HasPropertyId( const a2dPropertyId* id ) const;\
840 virtual a2dPropertyId* HasPropertyId( const wxString& name );\
841 virtual const a2dNamedProperty* FindProperty( const wxString &idName ) const;\
842 virtual void CollectProperties2( a2dNamedPropertyList *total, const a2dPropertyId *id = NULL, a2dPropertyId::Flags flags = a2dPropertyId::flag_none ) const;\
844 static a2dDynamicIdMap sm_dymPropIds;
846 #define INITIALIZE_PROPERTIES_BASE( classname ) \
847 a2dDynamicIdMap& classname::GetPropertyIdMap() \
849 return sm_dymPropIds;\
851 bool classname::AddPropertyId( a2dPropertyId *dynproperty )\
853 if ( sm_dymPropIds.find( dynproperty->GetName() ) == sm_dymPropIds.end() )\
854 sm_dymPropIds[ dynproperty->GetName() ]= dynproperty;\
856 wxASSERT_MSG( 0, _("The property id name '") + dynproperty->GetName() + _("' already exists in #classname") );\
859 bool classname::HasPropertyId( const a2dPropertyId* id ) const\
861 a2dDynamicIdMap::iterator iter = sm_dymPropIds.find( id->GetName() );\
862 if ( iter != sm_dymPropIds.end() )\
866 a2dPropertyId* classname::HasPropertyId( const wxString& name )\
868 a2dDynamicIdMap::iterator iter = sm_dymPropIds.find( name );\
869 if ( iter != sm_dymPropIds.end() )\
870 return sm_dymPropIds[ name ];\
873 const a2dNamedProperty *classname::FindProperty( const wxString &idName ) const\
875 a2dDynamicIdMap::iterator iter = sm_dymPropIds.find( idName );\
876 if ( iter != sm_dymPropIds.end() )\
878 a2dPropertyIdPtr propId = ( *iter ).second;\
879 return GetProperty( propId );\
883 void classname::CollectProperties2( a2dNamedPropertyList *total, const a2dPropertyId *id, a2dPropertyId::Flags flags ) const\
885 for ( a2dDynamicIdMap::iterator i = sm_dymPropIds.begin(); i != sm_dymPropIds.end(); i++ )\
887 a2dPropertyIdPtr p = (*i).second;\
888 if( p->CheckCollect( id, flags ) )\
890 a2dNamedProperty* dprop = p->GetPropertyAsNamedProperty( this );\
892 total->push_back( dprop );\
896 a2dDynamicIdMap classname::sm_dymPropIds; \
897 static bool initProp##classname = classname::InitializePropertyIds(); \
898 bool classname::InitializePropertyIds()
901 #define INITIALIZE_PROPERTIES( classname, baseclassname ) \
902 a2dDynamicIdMap& classname::GetPropertyIdMap() \
904 return sm_dymPropIds;\
906 bool classname::AddPropertyId( a2dPropertyId *dynproperty )\
908 if ( sm_dymPropIds.find( dynproperty->GetName() ) == sm_dymPropIds.end() )\
909 sm_dymPropIds[ dynproperty->GetName() ]= dynproperty;\
911 wxASSERT_MSG( 0, _("The property id name '") + dynproperty->GetName() + _("' already exists in #classname") );\
914 bool classname::HasPropertyId( const a2dPropertyId* id ) const\
916 a2dDynamicIdMap::iterator iter = sm_dymPropIds.find( id->GetName() );\
917 if ( iter != sm_dymPropIds.end() )\
919 return baseclassname::HasPropertyId( id );\
921 a2dPropertyId* classname::HasPropertyId( const wxString& name )\
923 a2dDynamicIdMap::iterator iter = sm_dymPropIds.find( name );\
924 if ( iter != sm_dymPropIds.end() )\
925 return sm_dymPropIds[ name ];\
926 return baseclassname::HasPropertyId( name );\
928 const a2dNamedProperty *classname::FindProperty( const wxString &idName ) const\
930 a2dDynamicIdMap::iterator iter = sm_dymPropIds.find( idName );\
931 if ( iter != sm_dymPropIds.end() )\
933 a2dPropertyIdPtr propId = ( *iter ).second;\
934 return GetProperty( propId );\
936 return baseclassname::FindProperty( idName );\
938 void classname::CollectProperties2( a2dNamedPropertyList *total, const a2dPropertyId *id, a2dPropertyId::Flags flags ) const\
940 for ( a2dDynamicIdMap::iterator i = sm_dymPropIds.begin(); i != sm_dymPropIds.end(); i++ )\
942 a2dPropertyIdPtr p = (*i).second;\
943 if( p->CheckCollect( id, flags ) )\
945 a2dNamedProperty* dprop = p->GetPropertyAsNamedProperty( this );\
947 total->push_back( dprop );\
950 return baseclassname::CollectProperties2( total, id, flags );\
952 a2dDynamicIdMap classname::sm_dymPropIds; \
953 static bool initProp##classname = classname::InitializePropertyIds(); \
954 bool classname::InitializePropertyIds()
956 #ifdef WXVALIDEVENTENTRY
958 #if !wxCHECK_VERSION(2,9,0)
964 wxObjectEventFunction fn, wxObject* data, wxEvtHandler* eventSink )
965 : wxDynamicEventTableEntry( evType, winid, idLast, fn, data, eventSink ),
966 m_disconnect(
false )
978 wxEventFunctor* fn, wxObject* data )
979 : wxDynamicEventTableEntry( evType, winid, idLast, fn, data ),
980 m_disconnect( false )
1045 class A2DGENERALDLLEXP a2dObject :
public wxEvtHandler
1048 DECLARE_ABSTRACT_CLASS( a2dObject )
1052 #ifdef WXVALIDEVENTENTRY
1054 bool SearchDynamicEventTable( wxEvent& event );
1056 #else //WXVALIDEVENTENTRY
1057 virtual bool ProcessEvent( wxEvent& event );
1059 bool SearchDynamicEventTable( wxEvent& event );
1061 #if !wxCHECK_VERSION(2,9,0)
1065 void Connect(
int winid,
1068 wxObjectEventFunction func,
1069 wxObject* userData = ( wxObject* ) NULL,
1070 wxEvtHandler* eventSink = ( wxEvtHandler* ) NULL );
1071 bool Disconnect(
int winid,
1073 wxEventType eventType,
1074 wxObjectEventFunction func = NULL,
1075 wxObject* userData = ( wxObject* ) NULL,
1076 wxEvtHandler* eventSink = ( wxEvtHandler* ) NULL );
1080 bool TryBeforeAndHere( wxEvent& event )
1082 return TryBefore( event ) || TryHereOnly( event );
1085 bool DoTryChain( wxEvent& event );
1087 bool ProcessEventLocally( wxEvent& event );
1089 bool TryHereOnly( wxEvent& event );
1091 void Connect(
int winid,
1093 wxEventType eventType,
1094 wxObjectEventFunction func,
1095 wxObject* userData = NULL,
1096 wxEvtHandler* eventSink = NULL )
1098 DoBind( winid, lastId, eventType,
1099 wxNewEventFunctor( eventType, func, eventSink ),
1103 bool Disconnect(
int winid,
1105 wxEventType eventType,
1106 wxObjectEventFunction func = NULL,
1107 wxObject* userData = NULL,
1108 wxEvtHandler* eventSink = NULL )
1110 return DoUnbind( winid, lastId, eventType,
1111 wxMakeEventFunctor( eventType, func, eventSink ),
1116 void DoBind(
int winid,
1118 wxEventType eventType,
1119 wxEventFunctor* func,
1120 wxObject* userData = NULL );
1122 bool DoUnbind(
int winid,
1124 wxEventType eventType,
1125 const wxEventFunctor& func,
1126 wxObject* userData = NULL );
1128 #endif //WXVALIDEVENTENTRY
1135 void ProcessConnectedEvent( wxEvent& event );
1140 void ConnectEvent( wxEventType type, wxEvtHandler* eventSink );
1145 bool DisconnectEvent( wxEventType type, wxEvtHandler* eventSink );
1148 bool DisconnectEventAll( wxEvtHandler* eventSink );
1154 virtual ~a2dObject();
1157 void operator = (
const a2dObject& other );
1163 #if wxUSE_STD_IOSTREAM && (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT)
1164 virtual void Dump( wxSTD ostream& str );
1183 virtual a2dObject* SetNonDynamic();
1190 void CheckReferences();
1203 clone_members = 0x00000001,
1205 clone_properties = 0x00000002,
1207 clone_childs = 0x00000004,
1209 clone_unused = 0x00000008,
1212 clone_setoriginal = 0x00000010,
1215 clone_seteditcopy = 0x00000020,
1217 clone_noReference = 0x00000040,
1219 clone_noCameleonRef = 0x00000080,
1221 clone_toDrag = 0x00000100,
1223 clone_flat = 0x00000000,
1224 clone_deep = clone_members | clone_properties | clone_childs,
1226 friend inline CloneOptions
operator|( CloneOptions a, CloneOptions b )
1228 return ( CloneOptions )( ( int )a | (
int ) b );
1232 a2dObject* Clone( CloneOptions options,
a2dRefMap* refs = NULL )
const;
1234 a2dObject(
const a2dObject& other, CloneOptions options,
a2dRefMap* refs );
1249 virtual wxString GetName()
const;
1255 virtual void SetName(
const wxString& name );
1260 #if wxART2D_USE_CVGIO
1303 #endif //wxART2D_USE_CVGIO
1308 wxInt64 GetUniqueSerializationId()
const;
1315 virtual bool AlwaysWriteSerializationId()
const;
1319 virtual bool LinkReference( a2dObject* other );
1323 virtual void ResolveInform( );
1339 inline void SetCheck(
bool check ) { m_check = check; }
1375 virtual a2dObject* SmrtPtrOwn()
1377 m_refcount++;
return this;
1383 virtual bool SmrtPtrRelease();
1395 virtual a2dObject* DoClone( CloneOptions options,
a2dRefMap* refs )
const = 0;
1444 const a2dNamedProperty* classname::FindProperty(
const wxString& idName )
const;
1467 virtual bool HasProperty(
const a2dPropertyId*
id,
const wxString& stringvalue = wxEmptyString )
const;
1479 virtual bool EditProperties(
const a2dPropertyId*
id,
bool withUndo =
true );
1492 wxURI GetURI()
const;
1505 void SetURI(
const wxURI& url );
1515 return !m_propertylist.empty();
1520 virtual bool RemoveProperty(
const a2dPropertyId* WXUNUSED(
id ),
bool all =
true );
1523 void RemoveTemporaryProperties( );
1529 virtual bool AddProperty( a2dNamedProperty* property );
1553 #if wxART2D_USE_CVGIO
1557 virtual void DoLoad( wxObject* parent,
a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
1558 #endif //wxART2D_USE_CVGIO
1573 bool m_recursion_active: 1;
1575 bool m_pendingDisconnects: 1;
1577 unsigned int m_iteratorCount;
1583 enum { refcount_nondynamic = 0x76543210 };
1587 #if defined(_DEBUG) && defined (SMART_POINTER_DEBUG)
1614 a2dObject(
const a2dObject& other );
1621 #if defined(_DEBUG) && defined (SMART_POINTER_DEBUG)
1625 #define a2dREFOBJECTPTR_KEEPALIVE CurrentSmartPointerOwner = this;\
1626 a2dObjectPtr keepalive(__FILE__, __LINE__,(this->m_refcount != 0 ? this : NULL ))
1631 #define a2dREFOBJECTPTR_KEEPALIVE a2dObjectPtr keepalive = (this->m_refcount != 0 ? this : NULL )
1657 m_object = theObjectToWrap;
1663 wxASSERT_MSG( m_refcount == 0, wxT(
"deleting a2dRefCount while referenced" ) );
1667 wxObject* GetObj() {
return m_object; }
1669 #if defined(_DEBUG) && defined (SMART_POINTER_DEBUG)
1693 m_refcount++;
return this;
1699 virtual bool SmrtPtrRelease()
1702 wxASSERT_MSG( m_refcount >= 0, wxT(
"wxRefCount Own/Release not matched (extra Release calls)" ) );
1703 if ( m_refcount <= 0 )
1785 class A2DGENERALDLLEXP a2dNamedProperty :
public wxObject
1788 #ifdef CLASS_MEM_MANAGEMENT
1796 void*
operator new(
size_t bytes )
1798 return sm_memManager.
Allocate( bytes );
1807 void operator delete(
void* space,
size_t bytes )
1812 #endif //CLASS_MEM_MANAGEMENT
1822 a2dNamedProperty(
const a2dNamedProperty& other );
1828 virtual void Assign(
const a2dNamedProperty& other ) = 0;
1831 virtual ~a2dNamedProperty();
1844 inline void SetCheck(
bool check ) { m_check = check; }
1858 const a2dPropertyId*
GetId()
const { wxASSERT_MSG( m_id, wxT(
"id not set in property" ) );
return m_id; }
1861 virtual const a2dPropertyId* CreateId( a2dObject* parent,
const wxString& name );
1864 wxString
GetName()
const {
return m_id->GetName(); }
1867 virtual wxString GetString()
const;
1870 virtual double GetDouble()
const;
1873 virtual float GetFloat()
const;
1876 virtual bool GetBool()
const;
1879 virtual wxInt16 GetInt16()
const;
1882 virtual wxUint16 GetUint16()
const;
1885 virtual wxInt32 GetInt32()
const;
1888 virtual wxUint32 GetUint32()
const;
1891 virtual void* GetVoidPtr()
const;
1894 virtual a2dObject* GetRefObject()
const;
1897 virtual a2dObject* GetRefObjectNA()
const;
1919 double ParseDouble(
unsigned int& position );
1921 void SkipCommaSpaces(
unsigned int& position );
1923 void SkipSpaces(
unsigned int& position );
1931 #if wxART2D_USE_CVGIO
1935 virtual void DoLoad( wxObject* parent,
a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
1936 #endif //wxART2D_USE_CVGIO
1938 DECLARE_CLASS( a2dNamedProperty )
1942 virtual a2dNamedProperty* DoClone( a2dObject::CloneOptions options,
a2dRefMap* refs ) const = 0;
1954 #if defined(_DEBUG) && defined (SMART_POINTER_DEBUG)
1955 a2dNamedPropertyList* m_ownerlist;
1976 a2dNamedProperty* SmrtPtrOwn() { m_refcount++;
return this; }
1981 bool SmrtPtrRelease()
1984 wxASSERT_MSG( m_refcount >= 0, wxT(
"a2dNamedProperty Own/Release not matched (extra Release calls)" ) );
1985 if ( m_refcount <= 0 )
2014 virtual void Assign(
const a2dNamedProperty& other );
2029 void SetValue(
bool value );
2031 bool GetValue()
const {
return m_value; }
2035 bool* GetValuePtr() {
return &m_value; }
2037 bool& GetValueRef() {
return m_value; }
2039 const bool* GetValuePtr()
const {
return &m_value; }
2041 const bool& GetValueRef()
const {
return m_value; }
2043 virtual wxString StringRepresentation()
const;
2045 virtual wxString StringValueRepresentation()
const;
2047 virtual const a2dPropertyId* CreateId( a2dObject* parent,
const wxString& name );
2049 #if wxART2D_USE_CVGIO
2051 virtual void DoLoad( wxObject* parent,
a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
2052 #endif //wxART2D_USE_CVGIO
2057 virtual a2dNamedProperty* DoClone( a2dObject::CloneOptions options,
a2dRefMap* refs ) const;
2076 virtual void Assign(
const a2dNamedProperty& other );
2084 void SetValue(
const wxString& value );
2086 wxString& GetValue() {
return m_value; }
2087 const wxString& GetValue()
const {
return m_value; }
2091 wxString* GetValuePtr() {
return &m_value; }
2097 virtual const a2dPropertyId* CreateId( a2dObject* parent,
const wxString& name );
2099 #if wxART2D_USE_CVGIO
2101 virtual void DoLoad( wxObject* parent,
a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
2102 #endif //wxART2D_USE_CVGIO
2108 virtual a2dNamedProperty* DoClone( a2dObject::CloneOptions options,
a2dRefMap* refs ) const;
2127 virtual void Assign(
const a2dNamedProperty& other );
2135 void SetValue(
void* value );
2137 void* GetValue()
const {
return m_value; }
2141 void** GetValuePtr() {
return &m_value; }
2143 virtual wxString StringRepresentation()
const;
2145 virtual wxString StringValueRepresentation()
const;
2147 #if wxART2D_USE_CVGIO
2149 virtual void DoLoad( wxObject* parent,
a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
2150 #endif //wxART2D_USE_CVGIO
2155 virtual a2dNamedProperty* DoClone( a2dObject::CloneOptions options,
a2dRefMap* refs ) const;
2174 virtual void Assign(
const a2dNamedProperty& other );
2182 void SetValue(
const wxObject& value );
2184 const wxObject& GetValue()
const {
return m_value; }
2209 virtual void Assign(
const a2dNamedProperty& other );
2217 void SetValue( a2dObject* value );
2222 a2dObject* GetValue()
const {
return m_value; }
2224 a2dObjectPtr* GetValuePtr() {
return &m_value; }
2226 a2dObjectPtr& GetValueRef() {
return m_value; }
2228 virtual wxString StringRepresentation()
const;
2230 virtual wxString StringValueRepresentation()
const;
2232 #if wxART2D_USE_CVGIO
2234 virtual void DoLoad( wxObject* parent,
a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
2235 #endif //wxART2D_USE_CVGIO
2241 virtual a2dNamedProperty* DoClone( a2dObject::CloneOptions options,
a2dRefMap* refs ) const;
2243 a2dObjectPtr m_value;
2260 virtual void Assign(
const a2dNamedProperty& other );
2268 void SetValue( a2dObject* value );
2273 a2dObject* GetValue()
const {
return m_value; }
2275 a2dObjectAutoZeroPtr* GetValuePtr() {
return &m_value; }
2277 a2dObjectAutoZeroPtr& GetValueRef() {
return m_value; }
2279 virtual wxString StringRepresentation()
const;
2281 virtual wxString StringValueRepresentation()
const;
2283 #if wxART2D_USE_CVGIO
2285 virtual void DoLoad( wxObject* parent,
a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
2286 #endif //wxART2D_USE_CVGIO
2292 virtual a2dNamedProperty* DoClone( a2dObject::CloneOptions options,
a2dRefMap* refs ) const;
2294 a2dObjectAutoZeroPtr m_value;
2311 virtual void Assign(
const a2dNamedProperty& other );
2319 void SetValue( wxInt16 value );
2321 wxInt16 GetValue()
const {
return m_value; }
2325 wxInt16* GetValuePtr() {
return &m_value; }
2327 wxInt16& GetValueRef() {
return m_value; }
2329 virtual wxString StringRepresentation()
const;
2331 virtual wxString StringValueRepresentation()
const;
2333 #if wxART2D_USE_CVGIO
2335 virtual void DoLoad( wxObject* parent,
a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
2336 #endif //wxART2D_USE_CVGIO
2342 virtual a2dNamedProperty* DoClone( a2dObject::CloneOptions options,
a2dRefMap* refs ) const;
2361 virtual void Assign(
const a2dNamedProperty& other );
2369 void SetValue( wxUint16 value );
2371 wxUint16 GetValue()
const {
return m_value; }
2375 wxUint16* GetValuePtr() {
return &m_value; }
2377 wxUint16& GetValueRef() {
return m_value; }
2379 virtual wxString StringRepresentation()
const;
2381 virtual wxString StringValueRepresentation()
const;
2383 #if wxART2D_USE_CVGIO
2385 virtual void DoLoad( wxObject* parent,
a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
2386 #endif //wxART2D_USE_CVGIO
2392 virtual a2dNamedProperty* DoClone( a2dObject::CloneOptions options,
a2dRefMap* refs ) const;
2411 virtual void Assign(
const a2dNamedProperty& other );
2419 void SetValue( wxInt32 value );
2421 wxInt32 GetValue()
const {
return m_value; }
2425 wxInt32* GetValuePtr() {
return &m_value; }
2427 wxInt32& GetValueRef() {
return m_value; }
2429 virtual wxString StringRepresentation()
const;
2431 virtual wxString StringValueRepresentation()
const;
2433 virtual const a2dPropertyId* CreateId( a2dObject* parent,
const wxString& name );
2435 #if wxART2D_USE_CVGIO
2437 virtual void DoLoad( wxObject* parent,
a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
2438 #endif //wxART2D_USE_CVGIO
2444 virtual a2dNamedProperty* DoClone( a2dObject::CloneOptions options,
a2dRefMap* refs ) const;
2463 virtual void Assign(
const a2dNamedProperty& other );
2471 void SetValue( wxUint32 value );
2473 wxUint32 GetValue()
const {
return m_value; }
2477 wxUint32* GetValuePtr() {
return &m_value; }
2479 wxUint32& GetValueRef() {
return m_value; }
2481 virtual wxString StringRepresentation()
const;
2483 virtual wxString StringValueRepresentation()
const;
2485 #if wxART2D_USE_CVGIO
2487 virtual void DoLoad( wxObject* parent,
a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
2488 #endif //wxART2D_USE_CVGIO
2494 virtual a2dNamedProperty* DoClone( a2dObject::CloneOptions options,
a2dRefMap* refs ) const;
2513 virtual void Assign(
const a2dNamedProperty& other );
2521 void SetValue(
double value );
2523 double GetValue()
const {
return m_value; }
2527 double* GetValuePtr() {
return &m_value; }
2529 double& GetValueRef() {
return m_value; }
2531 virtual wxString StringRepresentation()
const;
2533 virtual wxString StringValueRepresentation()
const;
2535 #if wxART2D_USE_CVGIO
2537 virtual void DoLoad( wxObject* parent,
a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
2538 #endif //wxART2D_USE_CVGIO
2544 virtual a2dNamedProperty* DoClone( a2dObject::CloneOptions options,
a2dRefMap* refs ) const;
2563 virtual void Assign(
const a2dNamedProperty& other );
2571 void SetValue(
float value );
2573 float GetValue()
const {
return m_value; }
2579 float* GetValuePtr() {
return &m_value; }
2581 float& GetValueRef() {
return m_value; }
2583 virtual wxString StringRepresentation()
const;
2585 virtual wxString StringValueRepresentation()
const;
2587 #if wxART2D_USE_CVGIO
2589 virtual void DoLoad( wxObject* parent,
a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
2590 #endif //wxART2D_USE_CVGIO
2596 virtual a2dNamedProperty* DoClone( a2dObject::CloneOptions options,
a2dRefMap* refs ) const;
2617 virtual void Assign(
const a2dNamedProperty& other );
2625 void Add(
const wxString& value );
2627 void SetValue(
const wxArrayString& value );
2629 wxArrayString& GetValue() {
return m_value; }
2630 const wxArrayString& GetValue()
const {
return m_value; }
2632 wxArrayString* GetValuePtr() {
return &m_value; }
2634 virtual wxString StringRepresentation()
const;
2636 virtual wxString StringValueRepresentation()
const;
2638 #if wxART2D_USE_CVGIO
2640 virtual void DoLoad( wxObject* parent,
a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
2641 #endif //wxART2D_USE_CVGIO
2649 wxArrayString m_value;
2666 virtual void Assign(
const a2dNamedProperty& other );
2674 void SetValue(
const wxFileName& filenameObject );
2676 wxFileName GetValue()
const {
return m_filenameObject; }
2678 wxFileName* GetValuePtr() {
return &m_filenameObject; }
2680 wxFileName& GetValueRef() {
return m_filenameObject; }
2682 void SetFileName(
const wxFileName& filenameObject );
2684 wxFileName GetFileName() {
return m_filenameObject; }
2686 wxFileName& GetFileNameRef() {
return m_filenameObject; }
2688 virtual wxString StringRepresentation()
const;
2690 virtual wxString StringValueRepresentation()
const;
2692 #if wxART2D_USE_CVGIO
2694 virtual void DoLoad( wxObject* parent,
a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
2695 #endif //wxART2D_USE_CVGIO
2703 wxFileName m_filenameObject;
2720 virtual void Assign(
const a2dNamedProperty& other );
2728 void SetValue(
const wxDateTime& datetimeObject );
2730 wxDateTime GetValue()
const {
return m_datetimeObject; }
2732 wxDateTime* GetValuePtr() {
return &m_datetimeObject; }
2734 wxDateTime& GetValueRef() {
return m_datetimeObject; }
2736 void SetDateTime(
const wxDateTime& datetimeObject );
2738 wxDateTime GetDateTime() {
return m_datetimeObject; }
2740 wxDateTime& GetDateTimeRef() {
return m_datetimeObject; }
2742 virtual wxString StringRepresentation()
const;
2744 virtual wxString StringValueRepresentation()
const;
2746 #if wxART2D_USE_CVGIO
2748 virtual void DoLoad( wxObject* parent,
a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
2749 #endif //wxART2D_USE_CVGIO
2757 wxDateTime m_datetimeObject;
2774 virtual void Assign(
const a2dNamedProperty& other );
2782 void SetValue( wxMenu* menu );
2784 wxMenu* GetValue()
const {
return m_menu; }
2786 wxMenu** GetValuePtr() {
return &m_menu; }
2788 #if wxART2D_USE_CVGIO
2790 virtual void DoLoad( wxObject* parent,
a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
2791 #endif //wxART2D_USE_CVGIO
2816 virtual void Assign(
const a2dNamedProperty& other );
2824 void SetValue( wxWindow* window );
2826 wxWindow* GetValue()
const {
return m_window; }
2828 wxWindow** GetValuePtr() {
return &m_window; }
2830 #if wxART2D_USE_CVGIO
2832 virtual void DoLoad( wxObject* parent,
a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
2833 #endif //wxART2D_USE_CVGIO
2878 virtual void Assign(
const a2dNamedProperty& other );
2886 void SetString(
const wxString& tipstring );
2894 const wxRect&
GetRect()
const {
return m_rectStay; }
2899 #if wxART2D_USE_CVGIO
2901 virtual void DoLoad( wxObject* parent,
a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
2902 #endif //wxART2D_USE_CVGIO
2908 virtual a2dNamedProperty* DoClone( a2dObject::CloneOptions options,
a2dRefMap* refs ) const;
2910 wxString m_tipstring;
2935 wxString FindValidPath (
const wxString& filename,
bool reportError =
true );
2939 wxString FindAbsoluteValidPath(
const wxString& filename );
2942 wxString GetAsString();
2944 bool ExpandPath( wxString& pathToExpand, wxPathFormat format = wxPATH_NATIVE );
2955 bool VarRef( wxChar type );
2961 wxString m_error_mes;
2967 #if defined(WXDOCVIEW_USINGDLL)
2976 class A2DGENERALDLLEXP a2dPathListProperty:
public a2dNamedProperty
2980 a2dPathListProperty();
2982 a2dPathListProperty(
const a2dPropertyIdPathList*
id,
const a2dPathList& pathlist );
2984 a2dPathListProperty(
const a2dPathListProperty* ori );
2986 a2dPathListProperty(
const a2dPathListProperty& other );
2988 virtual void Assign(
const a2dNamedProperty& other );
2990 virtual ~a2dPathListProperty();
2994 static a2dPathListProperty* CreatePropertyFromString(
const a2dPropertyIdPathList*
id,
const wxString& value );
2996 void SetValue(
const a2dPathList& pathlistObject );
2998 a2dPathList GetValue()
const {
return m_pathlistObject; }
3000 a2dPathList* GetValuePtr() {
return &m_pathlistObject; }
3002 a2dPathList& GetValueRef() {
return m_pathlistObject; }
3004 void SetFileName(
const a2dPathList& pathlistObject );
3006 a2dPathList GetFileName() {
return m_pathlistObject; }
3008 a2dPathList& GetFileNameRef() {
return m_pathlistObject; }
3010 virtual wxString StringRepresentation()
const;
3012 virtual wxString StringValueRepresentation()
const;
3014 #if wxART2D_USE_CVGIO
3016 virtual void DoLoad( wxObject* parent,
a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
3017 #endif //wxART2D_USE_CVGIO
3019 DECLARE_DYNAMIC_CLASS( a2dPathListProperty )
3029 extern A2DGENERALDLLEXP wxColour ParseSvgColour( wxString value );
3045 virtual void Assign(
const a2dNamedProperty& other );
3058 void SetValue(
const wxColour& colour );
3060 wxColour GetValue()
const {
return m_colour; }
3062 wxColour* GetValuePtr() {
return &m_colour; }
3064 wxColour& GetValueRef() {
return m_colour; }
3066 void SetColour(
const wxColour& colour );
3068 wxColour GetColour() {
return m_colour; }
3070 wxColour& GetColourRef() {
return m_colour; }
3072 virtual wxString StringRepresentation()
const;
3074 virtual wxString StringValueRepresentation()
const;
3076 #if wxART2D_USE_CVGIO
3078 virtual void DoLoad( wxObject* parent,
a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
3079 #endif //wxART2D_USE_CVGIO
3105 virtual void Assign(
const a2dNamedProperty& other );
3113 void SetValue(
const wxURI& uri );
3115 wxURI GetValue()
const {
return m_uri; }
3117 wxURI& GetValueRef() {
return m_uri; }
3119 #if wxART2D_USE_CVGIO
3121 virtual void DoLoad( wxObject* parent,
a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
3122 #endif //wxART2D_USE_CVGIO
3139 A2DGENERALDLLEXP_DATA(
extern a2dObjectList* ) wxNullRefObjectList;
3141 #include <wx/listimpl.cpp>
3143 #if (defined(__WXMSW__) && defined(WXUSINGDLL) )
3145 template class A2DGENERALDLLEXP std::allocator<class a2dSmrtPtr<class a2dObject> >;
3146 template class A2DGENERALDLLEXP std::allocator< std::_List_nod<class a2dSmrtPtr<class a2dObject>, std::allocator<class a2dSmrtPtr<class a2dObject> > >::_Node >;
3147 template class A2DGENERALDLLEXP std::allocator< std::_List_ptr<class a2dSmrtPtr<class a2dObject>, std::allocator<class a2dSmrtPtr<class a2dObject> > >::_Nodeptr >;
3148 template class A2DGENERALDLLEXP std::list<class a2dSmrtPtr<class a2dObject> >;
3176 bool Release(
const wxString& classname = wxT(
"" ),
bool all =
false );
3183 a2dObject* Find(
const wxString& classname = wxT(
"" ),
const wxString& name = wxT(
"" ) );
3193 int CollectObjects(
a2dObjectList* total,
const wxString& propertyNameFilter = wxT(
"" ),
const wxString& classname = wxT(
"" ) );
3199 #include <wx/hashmap.h>
3206 class A2DGENERALDLLEXP a2dVariablesHashBase_wxImplementation_HashTable;
3207 class A2DGENERALDLLEXP a2dVariablesHashBase_wxImplementation_KeyEx;
3208 WX_DECLARE_STRING_HASH_MAP_WITH_DECL( a2dNamedProperty*, a2dVariablesHashBase,
class A2DGENERALDLLEXP );
3248 bool SetVariable(
const wxString& variableName, a2dNamedProperty* property );
3257 bool SetVariableRefObject(
const wxString& variableName, a2dObject* value );
3266 bool SetVariableString(
const wxString& variableName,
const wxString& value );
3275 bool SetVariableDouble(
const wxString& variableName,
double value );
3284 bool SetVariableInt(
const wxString& variableName,
int value );
3291 const a2dNamedProperty* GetVariable(
const wxString& variableName );
3298 a2dNamedProperty* GetVariableClone(
const wxString& variableName );
3305 a2dObject* GetVariableRefObject(
const wxString& variableName );
3312 wxString* GetVariableString(
const wxString& variableName );
3344 void AppendVariable( a2dNamedProperty* property );
3350 void AppendVariableRefObject( a2dObject* value );
3356 void AppendVariableString(
const wxString& value );
3362 void AppendVariableDouble(
double value );
3368 void AppendVariableInt(
int value );
3375 const a2dNamedProperty& GetVariable(
int index );
3382 a2dNamedProperty* GetVariableClone(
int index );
3389 a2dObject* GetVariableRefObject(
int index );
3396 wxString GetVariableString(
int index );
3403 wxString GetVariableAsString(
int index );
3410 void SetMinSize(
int size );
3420 #if wxUSE_STD_IOSTREAM
3424 typedef wxSTD wistringstream a2dDocumentStringInputStream;
3432 typedef wxSTD wifstream a2dDocumentFileInputStream;
3434 typedef wxSTD wofstream a2dDocumentFileOutputStream;
3445 typedef wxSTD ifstream a2dDocumentFileInputStream;
3447 typedef wxSTD ofstream a2dDocumentFileOutputStream;
3476 virtual void Initialize();
3499 bool ResolveOrAddLink( a2dObject* obj,
const wxString&
id = wxT(
"" ) );
3502 void ResolveInform( a2dObject* obj );
3505 void SetLastObjectLoadedId(
const wxString& lastid );
3532 virtual bool LinkReferences(
bool ignoreNonResolved =
false );
3535 bool RemoveReference(
const wxString& idToRemove );
3554 wxString m_lastObjectId;
3561 #if wxART2D_USE_CVGIO
3563 virtual void DoLoad( wxObject* parent,
a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
3564 #endif //wxART2D_USE_CVGIO
3610 virtual wxObject* CreateObject(
const wxString& symbolicName );
3614 #if wxART2D_USE_CVGIO
3616 virtual void DoLoad( wxObject* parent,
a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts );
3617 #endif //wxART2D_USE_CVGIO
3646 virtual void InitializeLoad();
3649 virtual void ResetLoad();
3674 virtual bool CanLoad( a2dDocumentInputStream& stream,
const wxObject* obj = NULL, wxClassInfo* docClassInfo = NULL ) = 0;
3684 virtual bool Load( a2dDocumentInputStream& stream , wxObject* obj ) = 0;
3692 void SetFileName(
const wxFileName& filename ) { m_filename = filename; }
3694 const wxFileName& GetFileName()
const {
return m_filename; }
3699 wxFileName m_filename;
3705 void SetMode( wxEOL mode = wxEOL_NATIVE );
3730 size_t Read(
char* buffer,
size_t size );
3763 virtual void InitializeSave();
3766 virtual void ResetSave();
3776 virtual bool CanSave(
const wxObject* obj = NULL ) = 0;
3786 virtual bool Save( a2dDocumentOutputStream& stream,
const wxObject* obj ) = 0;
3788 void SetFileName(
const wxFileName& filename ) { m_filename = filename; }
3790 const wxFileName& GetFileName()
const {
return m_filename; }
3795 wxFileName m_filename;
3798 void SetMode( wxEOL mode = wxEOL_NATIVE );
3803 void Write32( wxUint32 i );
3805 void Write16( wxUint16 i );
3807 void Write8( wxUint8 i );
3809 virtual void WriteDouble(
double d );
3811 virtual void WriteString(
const wxString&
string );
3882 class A2DGENERALDLLEXP a2dIOHandlerCoupleHash;
3883 class A2DGENERALDLLEXP a2dIOHandlerCoupleHash_wxImplementation_HashTable;
3884 class A2DGENERALDLLEXP a2dIOHandlerCoupleHash_wxImplementation_KeyEx;
3886 #include <wx/hashmap.h>
3925 virtual void Initialize();
3961 void Unregister(
const wxString& classname ) { m_register.erase( classname ); }
3968 virtual bool WalkTask( wxObject* parent, wxObject*
object, a2dWalkEvent event );
3974 bool GetSkipNotRenderedInDrawing()
const {
return m_skipNotRenderedInDrawing; }
3976 void SetSkipNotRenderedInDrawing(
bool skipNotRenderedInDrawing ) { m_skipNotRenderedInDrawing = skipNotRenderedInDrawing; }
4016 extern wxColour A2DGENERALDLLEXP
HexToColour(
const wxString& hex );
4019 extern wxString A2DGENERALDLLEXP
ColourToHex(
const wxColour& colour );
4037 int* dummy =
new int;
4042 #include <wx/sstream.h>
bool m_result
result of walk, set false at start, use at will.
a2dHashMapCreateObject m_objectCreate
This is used to find a classname using a symbolic name.
const a2dError a2dError_LinkRef
property to hold an unsigned 4 byte integer type variable to be associated with a a2dObject ...
void SetLastError(a2dError error)
set last error encountered
(In) Visible property that can be added to Docview Objects.
a2dSmrtPtr< a2dObject > a2dObjectPtr
smart pointer to a2dObject
a2dHashMapCreateObject & GetObjectCreateHashMap()
has to map symbolic names to real classnames.
A2DGENERALDLLEXP long wxGenNewId()
This function is like wxNewId, but it has its own ID set.
void Unregister(const wxString &classname)
to Un-register a function to handle a class
list for a2dRefCount Smart pointers
virtual double GetDouble() const
when a2dDoubleProperty, return its value else assert
wxString GetIdName() const
name of the name of this error id
wxEOL GetMode()
get line end mode for textual files
static const a2dSignal sm_Edit_properties
edit properties event, see EditProperties()
virtual bool GetVisible() const
some derived properties can be visible or not and override this
virtual float GetFloat() const
when a2dFloatProperty, return its value else assert
const a2dError a2dError_CommandError
~a2dRefCountList()
destructor
const a2dError a2dError_NoDocTemplateRef
void SetErrorCode(a2dErrorWarningCode code)
set error code
static const a2dSignal sm_changedProperty
wxColour A2DGENERALDLLEXP HexToColour(const wxString &hex)
3-digit hex to wxColour
a2dSmrtPtr< a2dRefCount > a2dRefCountPtr
smart pointer for a2dRefCount
wxString GetErrorString()
get this when an error occured.
Simple Memory manager for some objects which often create and destroy to replace OS-system calls...
static long ms_timestamp
initialize timestamp
void SetRelease(bool value)
set release flag
virtual bool IsTemporary_DontSave() const
Check if this is a temporary object, which should not be saved.
void SetDepthFirst(bool depthFirst)
set if walker needs to go into recursive objects first.
property to hold a a2dObject pointer type variable to be associated with a a2dObject ...
const a2dError a2dError_GetVar
class to map references to objects stored in XML, in order to make the connection later on...
a2dDocumentRenderStyle operator|(a2dDocumentRenderStyle a, a2dDocumentRenderStyle b)
OR-ing a2dDocumentRenderStyle is allowed.
virtual wxString GetName() const
Get the ids print and serialization name.
void DecCurrentDepth()
Decrement recursion depth.
static a2dPropertyIdBool * PROPID_Check
used for linking multiple referenced objects when serializing
a2dAutoZeroPtr< a2dObject > * m_autozeroptrlist
this is a list of all a2dAutoZeroPtr object pointing to this object
void Register(const wxString &classname, a2dObjectIOFn *IOfunc)
to register a function to handle a class
const a2dError a2dError_CouldNotEvaluatePath
const wxRect & GetRect() const
get rect which keep tip visible
a2dError GetLastError() const
get last error encountered
friend class a2dPropertyId
wxProperty is a friend and allowed to use these functions
virtual wxString StringRepresentation() const
wxEOL GetMode()
get line end mode for textual files
Flags
Flags for property ids.
const a2dError a2dError_NoError
a2dIOHandler takes care of loading and/or saving data.
int a2dErrorWarningCode
error codes generated in docview framework.
wxOutputStream a2dDocumentOutputStream
output stream based wxStreams
virtual wxInt32 GetInt32() const
when a2dInt32Property, return its value else assert
bool GetDepthFirst()
What is the current recursion depth.
property to hold a double type variable to be associated with a a2dObject
a2dDocumentInputStream * m_streami
file or other string stream containing the format to parse.
property to hold a bool type variable to be associated with a a2dObject
void IncCurrentDepth()
Increment recursion depth.
const a2dError a2dError_FileCouldNotOpen
Input and output handler for the XmlSer format.
a2dNamedPropertyList m_propertylist
properties
wxString A2DGENERALDLLEXP ColourToHex(const wxColour &colour)
RGB to 3-digit hex.
A2DGENERALDLLEXP void wxGenRegisterId(long id)
see wxGenNewId(), use this to resrve a specific id
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dNamedPropertyEnd
id for a2dWalkEvent issued from within a2dWalkerIOHandler
const a2dError a2dError_NoTool
a2dResolveIdList m_toResolve
refernces to object which have not bin resolved yet ( e.g not read yet, but already referenced ) ...
property to hold a wxURI type variable to be associated with a a2dObject
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dNamedPropertyListStart
id for a2dWalkEvent issued from within a2dWalkerIOHandler
A trivial base class for a2dSmrtPtr. Non-template class, so that it can.
const a2dError a2dError_DocumentsOpened
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dCanvasObjectPreChild
id for a2dWalkEvent issued from within a2dWalkerIOHandler
using a file stream for input, stream the file into a a2dDocument or other object ...
wxEOL m_mode
end of line mode
wxString GetName() const
Get the name of the a2dPropertyId object.
list of a2dNamedProperty objects
#define DECLARE_PROPERTIES()
check if class has the given id as a valid id for this object
int m_nelements
number of used elements in m_properties
virtual bool GetCanRender() const
some derived properties can be renderable or not and override this
virtual a2dObject * GetRefObjectNA() const
when a2dProperty, return its value else return NULL
property to hold a window type variable (for example wxTipWindow) to be associated with a a2dObject ...
const a2dError a2dError_LoadFile
wxStringOutputStream a2dDocumentStringOutputStream
string output stream based wxStreams
wxEOL m_mode
end of line mode
property to hold a FileName type variable to be associated with a a2dObject
class A2DGENERALDLLEXP a2dVariablesHashBase
wxString keys plus a2dObject pointers
property to hold a a2dObjectPtr smart pointer type variable to be associated with a a2dObject ...
property to hold a wxArrayString type variable to be associated with a a2dObject
static a2dPropertyIdUri * PROPID_URI
attach an URL to the object
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dDerivedCanvasObjectStart
id for a2dWalkEvent issued from within a2dWalkerIOHandler
bool m_stopWalking
quit the iteration
property to hold a 2 byte integer type variable to be associated with a a2dObject ...
wxMBConv & m_conv
unicode conversion
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dNamedPropertyStart
id for a2dWalkEvent issued from within a2dWalkerIOHandler
bool GetUseObjRect() const
is the tip based on a2dCanvasObject boundingbox
Id based property system with its base a2dPropertyId.
virtual double GetDouble() const
when a2dDoubleProperty, return its value else assert
void SetProperty(a2dNamedProperty *propertyHolder, a2dPropertyId::SetFlags flags=a2dPropertyId::set_none)
Set the property to the this object.
const a2dError a2dError_FileHistory
const a2dError a2dError_CanceledFileDialog
const a2dError a2dError_IOHandler
virtual a2dObject * GetRefObject() const
when a2dProperty, return its value else assert
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dObjectStart
id for a2dWalkEvent issued from within a2dWalkerIOHandler
bool m_skipNotRenderedInDrawing
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dCanvasObjectPostChild
id for a2dWalkEvent issued from within a2dWalkerIOHandler
const a2dError a2dError_CouldNotCreateDocument
wxClassInfo * GetDocumentClassInfo() const
class info for the (document) class this handler reads data into.
const a2dError a2dError_NoSelection
property to hold a wxDateTime type variable to be associated with a a2dObject
a2dHashMapIntToObject m_objecthashmap
This is used to find multiple referenced objects by id.
SetFlags
Flags used for manipulating the way a property is set to a2dObject.
Io handler to iterate through a a2dDocument.
property to hold a 2 byte integer type variable to be associated with a a2dObject ...
bool GetCheck() const
general flag use at will.
Holds arrayed variables, e.g. parameter lists in a command processor.
wxObject * m_currentParent
parent object of current object
a2dRefCount(wxObject *theObjectToWrap)
constructor
bool GetCheck() const
general flag use at will.
virtual ~a2dRefCount()
destructor
bool(* a2dObjectIOFn)(wxObject *parent, wxObject *object, a2dWalkEvent)
a functions to store in a hash table
int GetCount()
get the number of elements in the array
const a2dError a2dError_SaveFile
wxString m_error
to store errors
a2dResolveIdList & GetResolveIdList()
list of not resolved objects
a2dAutoZeroPtr< a2dObject > TAutoZeroPtrListClass
this is needed inside the smart pointer template code
wxUint16 a2dPrintWhat
defines what to print
void Deallocate(void *space, size_t bytes)
function for adding memory block by size bytes to list of freed memory blocks
a2dNamedPropertyList()
Default constructor.
const a2dError a2dError_XMLparse
const a2dError a2dError_NoWrapper
void push_backobj(wxObject *obj)
convenient to push wxObject, instead of a2dRefCount( theObjectToWrap )
const a2dError a2dError_canvasObjectRelease
const a2dError a2dError_CouldNotLoad
a2dSignal GetEventComIdReturn()
after proecssin the event, on return an id can be set to communicate back to sender.
void * Allocate(size_t bytes)
function for allocating memory block by size bytes
memory management which can optionally be used for certain intensively used classes.
const a2dError a2dError_LinkPin
const a2dError a2dError_FileVersion
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dNamedPropertyListEnd
id for a2dWalkEvent issued from within a2dWalkerIOHandler
static const a2dSignal sm_non
wxStringInputStream a2dDocumentStringInputStream
string input stream based wxStreams
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dCanvasObjectProperties
id for a2dWalkEvent issued from within a2dWalkerIOHandler
const a2dPropertyId * GetId() const
Get the a2dPropertyId object identifying this property.
Holds internal variables to be used whereever needed.
const a2dError a2dError_LoadObject
wxObject * m_object
the wxObject that is maintained using Smart pointer within here.
Input and output handler for the XmlSer format.
const a2dError a2dError_SetEnv
const wxString & GetString(void)
when a2dStringProperty, return its value else assert
virtual void * GetVoidPtr() const
when a2dVoidPtrProperty, return its value else assert
a2dError()
default constructor
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dObjectEnd
id for a2dWalkEvent issued from within a2dWalkerIOHandler
static const a2dSignal sm_changedRefObject
WX_DECLARE_STRING_HASH_MAP(a2dPropertyId *, a2dPropertyIdHashMap)
Declaration of the hash map type to convert prop names to prop id objects.
virtual wxUint16 GetUint16() const
when a2dUint16Property, return its value else assert
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dPropertyStart
id for a2dWalkEvent issued from within a2dWalkerIOHandler
a2dHashMapIntToObject & GetObjectHashMap()
This is used to find multiple referenced objects by id.
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dCanvasObjectStart
id for a2dWalkEvent issued from within a2dWalkerIOHandler
int m_refcount
how many references to this object do exist
virtual wxUint32 GetUint32() const
when a2dUint32Property, return its value else assert
property to hold a tip window type variable to be associated with a a2dObject
void SetCheck(bool check)
general flag use at will.
property to hold a wxString type variable to be associated with a a2dObject
a2dError(const wxString &errorIdName, const wxString &error=wxEmptyString, bool warning=false)
constructor
bool GetUseCheck()
see SetUseCheck
static a2dPropertyIdString * PROPID_Name
Name property, to return name of this object.
using a file stream for output, stream a a2dDocument or other wxObject into a stream.
const a2dError a2dError_SaveObject
bool GetResult()
depending upon derived class implementation.
const a2dError a2dError_ImportObject
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dCanvasObjectEnd
id for a2dWalkEvent issued from within a2dWalkerIOHandler
wxClassInfo * m_docClassInfo
Run-time class information that allows document instances to be constructed dynamically.
int m_currentDepth
contour to be used by algorithm, to decide on how deep recursing is to be.
virtual wxString StringRepresentation() const
const a2dError a2dError_Canceled
wxInputStream a2dDocumentInputStream
input stream based wxStreams
const a2dError a2dError_NoPinClass
void SetToObjectClone(a2dObject *obj, a2dPropertyId::SetFlags setflags=a2dPropertyId::set_none) const
Set this property to an object and clone it if neccessary.
the settings used by all other include files are stored here.
virtual bool GetBool() const
when a2dBoolProperty, return its value else assert
class used in a2dResolveIdList to resolve references to other objects while readin in a file...
property to hold a FileName type variable to be associated with a a2dObject
simple ref counted class to maintain a wxObject* as if it is a smart pointer
property to hold a void pointer type variable to be associated with a a2dObject
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dPropertyEnd
id for a2dWalkEvent issued from within a2dWalkerIOHandler
const a2dError a2dError_NoView
int GetOwnedBy()
like it to be protected, but this does not work with wxList macros
bool GetRelease() const
get release flag
virtual wxString GetString() const
when a2dStringProperty, return its value else assert
virtual bool DoIgnoreIfNotMember(const a2dPropertyId *id) const
used to decide if a property shall be ignored, if it is not a member
This is the base class for all kinds of property id's for a2dObject.
a2dAutoZeroPtr< a2dObject > a2dObjectAutoZeroPtr
is a a2dAutoZeroPtr<a2dObject>
const a2dError a2dError_LoadLayers
bool HasDynamicProperties() const
test if there are dynamic properties in the m_propertylist
a2dRefCountList()
constructor
const a2dError a2dError_ImportFile
void SetErrorMessage(const wxString &error)
set error message
a2dErrorWarningCode GetErrorCode() const
get error code
wxString GetErrorMessage() const
get error string
a2dAutoZeroPtr< a2dObject > ** GetAutoZeroPtrList()
return the list head pointer for autozero pointers to this object
virtual a2dObject * GetRefObjectNA() const
when a2dProperty, return its value else return NULL
void SetToObject(a2dObject *obj, a2dPropertyId::SetFlags setflags=a2dPropertyId::set_none)
Set this property to an object.
const a2dError a2dError_GetEnv
property to hold a wxObject variable to be associated with a a2dObject
smart pointer class and list.
bool m_useCheck
if set a2dObject are only walked if not m_check is set
A list class for reference counted objects.
int m_refcount
how many references to this object do exist
const a2dError a2dError_NotSpecified
const a2dError a2dError_property
virtual wxString StringValueRepresentation() const
const a2dError a2dError_ToManyOpen
const a2dNamedPropertyList & GetPropertyList() const
Get the Property List.
virtual a2dObject * GetRefObject() const
when a2dProperty, return its value else assert
const a2dError a2dError_ExportFile
const a2dError a2dError_NoDocument
virtual wxInt16 GetInt16() const
when a2dInt16Property, return its value else assert
a2dSmrtPtr< a2dNamedProperty > a2dNamedPropertyPtr
smart pointerv to a2dNamedProperty
A2DGENERALDLLEXP a2dWalkEvent a2dWalker_a2dDerivedCanvasObjectEnd
id for a2dWalkEvent issued from within a2dWalkerIOHandler
int m_melements
number of elements in m_properties
bool GetStopWalking()
check for stop
void push_frontobj(wxObject *obj)
convenient to push wxObject, instead of a2dRefCount( theObjectToWrap )
This template class is for property ids with a known data type.
void SetDocumentClassInfo(wxClassInfo *docClassInfo)
class info for the (document) class this handler reads data into.
wxMBConv & m_conv
unicode conversion
void SetCheck(bool check)
general flag use at will.
const a2dError a2dError_NoController
a2dIOHandlerCoupleHash m_register
coupling function to event and classname
a2dNamedProperty ** m_properties
this is the array of properties
void SetUseCheck(bool useCheck)
set if walker needs to check objects for a2dObject::m_check set, before walking into it ...
property to hold a FileName type variable to be associated with a a2dObject
virtual wxString StringValueRepresentation() const
property to hold a float type variable to be associated with a a2dObject
A pointer class, that automatically calls SmrtPtrOwn/SmrtPtrRelease.
a2dDocumentOutputStream * m_streamo
file or other string stream containing the format to output to.
WX_DECLARE_HASH_MAP_WITH_DECL(wxString, a2dCommandId *, wxStringHash, wxStringEqual, a2dHashMapCommandIds, class A2DGENERALDLLEXP)
This hash table is used for a2dCommandId with name.
void SetStopWalking(bool stopWalking)
to further recursion, e.g. in a2dObject::Walker()
CloneOptions
options for cloning
property to hold an unsigned 2 byte integer type variable to be associated with a a2dObject ...
a2dError m_lastError
set to last error found when parsing
int GetCurrentDepth()
What is the current recursion depth.