1 | #ifndef __XMLIO_CVariable__ |
---|
2 | #define __XMLIO_CVariable__ |
---|
3 | |
---|
4 | /// xmlioserver headers /// |
---|
5 | #include "xmlioserver_spl.hpp" |
---|
6 | #include "declare_group.hpp" |
---|
7 | |
---|
8 | #include "data_output.hpp" |
---|
9 | |
---|
10 | namespace xmlioserver |
---|
11 | { |
---|
12 | namespace tree |
---|
13 | { |
---|
14 | /// ////////////////////// Déclarations ////////////////////// /// |
---|
15 | |
---|
16 | class CVariableGroup; |
---|
17 | class CVariableAttributes; |
---|
18 | class CVariable; |
---|
19 | |
---|
20 | ///-------------------------------------------------------------- |
---|
21 | |
---|
22 | // Declare/Define CVarAttribute |
---|
23 | BEGIN_DECLARE_ATTRIBUTE_MAP(CVariable) |
---|
24 | #include "var_attribute.conf" |
---|
25 | END_DECLARE_ATTRIBUTE_MAP(CVariable) |
---|
26 | |
---|
27 | ///-------------------------------------------------------------- |
---|
28 | |
---|
29 | class CVariable |
---|
30 | : public CObjectTemplate<CVariable> |
---|
31 | , public CVariableAttributes |
---|
32 | { |
---|
33 | /// typedef /// |
---|
34 | typedef CObjectTemplate<CVariable> SuperClass; |
---|
35 | typedef CVariableAttributes SuperClassAttribute; |
---|
36 | |
---|
37 | friend class CVariableGroup; |
---|
38 | |
---|
39 | public : |
---|
40 | |
---|
41 | typedef CVariableAttributes RelAttributes; |
---|
42 | typedef CVariableGroup RelGroup; |
---|
43 | |
---|
44 | /// Constructeurs /// |
---|
45 | CVariable(void); |
---|
46 | explicit CVariable(const StdString & id); |
---|
47 | CVariable(const CVariable & var); // Not implemented yet. |
---|
48 | CVariable(const CVariable * const var); // Not implemented yet. |
---|
49 | |
---|
50 | /// Destructeur /// |
---|
51 | virtual ~CVariable(void); |
---|
52 | |
---|
53 | public : |
---|
54 | |
---|
55 | /// Autres /// |
---|
56 | virtual void parse(xml::CXMLNode & node); |
---|
57 | virtual StdString toString(void) const; |
---|
58 | |
---|
59 | //virtual void toBinary (StdOStream & os) const; |
---|
60 | //virtual void fromBinary(StdIStream & is); |
---|
61 | |
---|
62 | /// Accesseur /// |
---|
63 | const StdString & getContent (void) const; |
---|
64 | |
---|
65 | |
---|
66 | template <typename T> inline void getData(T & _data) const; |
---|
67 | template <typename T, StdSize N> |
---|
68 | inline void getData(ARRAY(T, N) _data_array) const; |
---|
69 | |
---|
70 | public : |
---|
71 | |
---|
72 | /// Accesseurs statiques /// |
---|
73 | static StdString GetName(void); |
---|
74 | static StdString GetDefName(void); |
---|
75 | static ENodeType GetType(void); |
---|
76 | |
---|
77 | private : |
---|
78 | |
---|
79 | StdString content; |
---|
80 | |
---|
81 | }; // class CVar |
---|
82 | |
---|
83 | ///-------------------------------------------------------------- |
---|
84 | |
---|
85 | // Declare/Define CVarGroup and CVarDefinition |
---|
86 | DECLARE_GROUP_PARSE_REDEF(CVariable); |
---|
87 | |
---|
88 | |
---|
89 | |
---|
90 | } // namespace tree |
---|
91 | } // namespace xmlioserver |
---|
92 | |
---|
93 | #endif // __XMLIO_CVariable__ |
---|