23 #include "separatista/separatista.h" 24 #include "separatista/xerces_types.h" 25 #include "separatista/element.h" 26 #include "separatista/separatistadocument.h" 28 #ifndef SEPARATISTA_AUTOMAGIC_H 29 #define SEPARATISTA_AUTOMAGIC_H 44 virtual void elementValueChanged(
Element *pElement,
const wchar_t *pNewValue);
46 virtual void elementDeleted(
Element *pElement);
48 const wchar_t *m_pPath;
66 AutoMagic(
Element *pBaseElement,
const wchar_t *pWatchPath,
const wchar_t *pValuePath);
68 virtual void elementValueChanged(
Element *pElement,
const wchar_t *pNewValue);
70 virtual void elementDeleted(
Element *pElement);
73 virtual void doValueMagic(
Element *pElement,
const wchar_t *pNewValue) = 0;
75 virtual void doCreatedMagic(
Element *pParent,
Element *pChild) = 0;
77 virtual void doDeletedMagic(
Element *pElemenet) = 0;
92 Element *createValueElement(
Element *pBaseElement,
const wchar_t *pValuePath,
const wchar_t *pDefaultValue = TEXT(
"0"));
103 static void Create(
SeparatistaDocument *pDocument,
const wchar_t *pBasePath,
const wchar_t *pWatchPath,
const wchar_t *pValuePath)
110 void doValueMagic(
Element *pElement,
const wchar_t *pNewValue);
112 void doDeletedMagic(
Element *pElemenet);
115 const wchar_t *m_pWatchPath;
116 const wchar_t *m_pValuePath;
124 void doValueMagic(
Element *pElement,
const wchar_t *pNewValue);
126 void doDeletedMagic(
Element *pElemenet);
136 void doValueMagic(
Element *pElement,
const wchar_t *pNewValue);
138 void doDeletedMagic(
Element *pElemenet);
142 static unsigned int atoi(
const wchar_t c);
143 static wchar_t itoa(
unsigned int i);
145 static size_t findCh(
const wchar_t *pValue,
const wchar_t ch);
148 std::list<Element*> m_elements;
153 #endif // !defined SEPARATISTA_AUTOMAGIC_H Definition: automagic.h:55
Definition: separatistadocument.h:35
Definition: automagic.h:119
Definition: automagic.h:39
Definition: automagic.h:98
Definition: automagic.h:131