source: XMLIO_V2/dev/dev_rv/src/xmlio/node/domain.hpp @ 183

Last change on this file since 183 was 183, checked in by hozdoba, 13 years ago
File size: 3.3 KB
Line 
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
10namespace xmlioserver {
11namespace 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         
86      public :
87     
88         /// Mutateur ///
89         void addRelFile(const StdString & filename);
90         void completeLonLat(void);
91         
92         /// Destructeur ///
93         virtual ~CDomain(void);
94
95         /// Accesseurs statiques ///
96         static StdString GetName(void);
97         static StdString GetDefName(void);
98         
99         static ENodeType GetType(void);
100
101       private :
102
103         /// Proriétés protégées ///
104         bool isChecked;
105         ARRAY(int, 2) local_mask;
106         std::set<StdString> relFiles;
107
108         std::vector<int> ibegin_sub, iend_sub, jbegin_sub, jend_sub;
109         std::vector<ARRAY(double, 1)> lonvalue_sub, latvalue_sub;
110
111   }; // class CDomain
112
113   ///--------------------------------------------------------------
114
115   // Declare/Define CDomainGroup and CDomainDefinition
116   DECLARE_GROUP(CDomain);
117
118   ///--------------------------------------------------------------
119
120} // namespace tree
121} // namespace xmlioserver
122
123#endif // __XMLIO_CDomain__
Note: See TracBrowser for help on using the repository browser.