1 | #ifndef __XMLIO_CDomain__ |
---|
2 | #define __XMLIO_CDomain__ |
---|
3 | |
---|
4 | /// xmlioserver headers /// |
---|
5 | #include "xmlioserver_spl.hpp" |
---|
6 | #include "group_factory.hpp" |
---|
7 | #include "mask.hpp" |
---|
8 | |
---|
9 | #include "declare_group.hpp" |
---|
10 | |
---|
11 | namespace xmlioserver { |
---|
12 | namespace tree { |
---|
13 | |
---|
14 | /// ////////////////////// Déclarations ////////////////////// /// |
---|
15 | |
---|
16 | class CDomainGroup; |
---|
17 | class CDomainAttributes; |
---|
18 | class CDomain; |
---|
19 | |
---|
20 | ///-------------------------------------------------------------- |
---|
21 | |
---|
22 | // Declare/Define CDomainAttribute |
---|
23 | BEGIN_DECLARE_ATTRIBUTE_MAP(CDomain) |
---|
24 | #include "domain_attribute.conf" |
---|
25 | END_DECLARE_ATTRIBUTE_MAP(CDomain) |
---|
26 | |
---|
27 | ///-------------------------------------------------------------- |
---|
28 | |
---|
29 | class CDomain |
---|
30 | : public CObjectTemplate<CDomain> |
---|
31 | , public CDomainAttributes |
---|
32 | { |
---|
33 | /// typedef /// |
---|
34 | typedef CObjectTemplate<CDomain> SuperClass; |
---|
35 | typedef CDomainAttributes SuperClassAttribute; |
---|
36 | |
---|
37 | public : |
---|
38 | |
---|
39 | typedef CDomainAttributes RelAttributes; |
---|
40 | typedef CDomainGroup RelGroup; |
---|
41 | |
---|
42 | /// Constructeurs /// |
---|
43 | CDomain(void); |
---|
44 | explicit CDomain(const StdString & id); |
---|
45 | CDomain(const CDomain & domain); // Not implemented yet. |
---|
46 | CDomain(const CDomain * const domain); // Not implemented yet. |
---|
47 | |
---|
48 | /// Vérifications /// |
---|
49 | void checkAttributes(void); |
---|
50 | |
---|
51 | private : |
---|
52 | |
---|
53 | virtual void checkGlobalDomain(void); |
---|
54 | |
---|
55 | virtual void checkLocalIDomain(void); |
---|
56 | virtual void checkLocalJDomain(void); |
---|
57 | |
---|
58 | virtual void checkMask(void); |
---|
59 | virtual void checkDomainData(void); |
---|
60 | virtual void checkCompression(void); |
---|
61 | |
---|
62 | virtual void completeMask(void); |
---|
63 | |
---|
64 | public : |
---|
65 | |
---|
66 | /// Accesseurs /// |
---|
67 | boost::shared_ptr<CMask> getLocalMask(void) const; |
---|
68 | const std::set<StdString> & getRelFiles(void) const; |
---|
69 | |
---|
70 | /// Test /// |
---|
71 | bool IsWritten(const StdString & filename) const; |
---|
72 | |
---|
73 | /// Mutateur /// |
---|
74 | void addRelFile(const StdString & filename); |
---|
75 | |
---|
76 | /// Destructeur /// |
---|
77 | virtual ~CDomain(void); |
---|
78 | |
---|
79 | /// Accesseurs statiques /// |
---|
80 | static StdString GetName(void); |
---|
81 | static StdString GetDefName(void); |
---|
82 | |
---|
83 | static ENodeType GetType(void); |
---|
84 | |
---|
85 | private : |
---|
86 | |
---|
87 | /// Proriétés protégées /// |
---|
88 | bool isChecked; |
---|
89 | boost::shared_ptr<CMask> local_mask; |
---|
90 | std::set<StdString> relFiles; |
---|
91 | |
---|
92 | }; // class CDomain |
---|
93 | |
---|
94 | ///-------------------------------------------------------------- |
---|
95 | |
---|
96 | // Declare/Define CDomainGroup and CDomainDefinition |
---|
97 | DECLARE_GROUP(CDomain); |
---|
98 | |
---|
99 | ///-------------------------------------------------------------- |
---|
100 | |
---|
101 | } // namespace tree |
---|
102 | } // namespace xmlioserver |
---|
103 | |
---|
104 | #endif // __XMLIO_CDomain__ |
---|