1 | #ifndef __XMLIO_CContext__ |
---|
2 | #define __XMLIO_CContext__ |
---|
3 | |
---|
4 | /// xmlioserver headers /// |
---|
5 | #include "xmlioserver_spl.hpp" |
---|
6 | #include "node_type.hpp" |
---|
7 | |
---|
8 | #include "declare_group.hpp" |
---|
9 | |
---|
10 | namespace xmlioserver |
---|
11 | { |
---|
12 | namespace tree |
---|
13 | { |
---|
14 | /// ////////////////////// Déclarations ////////////////////// /// |
---|
15 | class CContextGroup; |
---|
16 | class CContextAttributes; |
---|
17 | class CContext; |
---|
18 | |
---|
19 | ///-------------------------------------------------------------- |
---|
20 | |
---|
21 | // Declare/Define CFileAttribute |
---|
22 | BEGIN_DECLARE_ATTRIBUTE_MAP(CContext) |
---|
23 | #include "../config/context_attribute.conf" |
---|
24 | END_DECLARE_ATTRIBUTE_MAP(CContext) |
---|
25 | |
---|
26 | ///-------------------------------------------------------------- |
---|
27 | |
---|
28 | class CContext |
---|
29 | : public CObjectTemplate<CContext> |
---|
30 | , public CContextAttributes |
---|
31 | { |
---|
32 | /// typedef /// |
---|
33 | typedef CObjectTemplate<CContext> SuperClass; |
---|
34 | typedef CContextAttributes SuperClassAttribute; |
---|
35 | |
---|
36 | public : |
---|
37 | |
---|
38 | typedef CContextAttributes RelAttributes; |
---|
39 | typedef CContext RelGroup; |
---|
40 | |
---|
41 | //--------------------------------------------------------- |
---|
42 | |
---|
43 | /// Constructeurs /// |
---|
44 | CContext(void); |
---|
45 | explicit CContext(const StdString & id); |
---|
46 | CContext(const CContext & context); // Not implemented yet. |
---|
47 | CContext(const CContext * const context); // Not implemented yet. |
---|
48 | |
---|
49 | /// Destructeur /// |
---|
50 | virtual ~CContext(void); |
---|
51 | |
---|
52 | //--------------------------------------------------------- |
---|
53 | |
---|
54 | /// Accesseurs statiques /// |
---|
55 | static StdString GetName(void); |
---|
56 | static StdString GetDefName(void); |
---|
57 | |
---|
58 | static boost::shared_ptr<CContextGroup> GetContextGroup(void); |
---|
59 | |
---|
60 | /// Traitements /// |
---|
61 | virtual void solveDescInheritance(const CAttributeMap * const parent = 0); |
---|
62 | void solveFieldRefInheritance(void); |
---|
63 | |
---|
64 | /// Autres méthodes statiques /// |
---|
65 | static void ShowTree(StdOStream & out = std::clog); |
---|
66 | |
---|
67 | /// Test /// |
---|
68 | virtual bool hasChild(void) const; |
---|
69 | |
---|
70 | /// Autres /// |
---|
71 | virtual void parse(xml::CXMLNode & node); |
---|
72 | |
---|
73 | virtual StdString toString(void) const; |
---|
74 | |
---|
75 | }; // class CContext |
---|
76 | |
---|
77 | ///-------------------------------------------------------------- |
---|
78 | |
---|
79 | // Declare/Define CContextGroup and CContextDefinition |
---|
80 | DECLARE_GROUP(CContext); |
---|
81 | |
---|
82 | } // namespace tree |
---|
83 | } // namespace xmlioserver |
---|
84 | |
---|
85 | #endif // __XMLIO_CContext__ |
---|