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