source: XMLIO_V2/dev/common/src/xmlio/node/domain.hpp @ 266

Last change on this file since 266 was 266, checked in by hozdoba, 13 years ago

Corrections après tests sur titane

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