1 | #ifndef __XMLIO_DATA_OUTPUT__ |
---|
2 | #define __XMLIO_DATA_OUTPUT__ |
---|
3 | |
---|
4 | /// xmlioserver headers /// |
---|
5 | #include "xmlioserver_spl.hpp" |
---|
6 | #include "exception.hpp" |
---|
7 | #include "grid.hpp" |
---|
8 | #include "field.hpp" |
---|
9 | |
---|
10 | #include <mpi.h> |
---|
11 | #include <netcdf.h> |
---|
12 | |
---|
13 | namespace xmlioserver |
---|
14 | { |
---|
15 | namespace io |
---|
16 | { |
---|
17 | /// ////////////////////// Déclarations ////////////////////// /// |
---|
18 | class CDataOutput |
---|
19 | { |
---|
20 | public : |
---|
21 | |
---|
22 | /// Définition de type /// |
---|
23 | typedef enum { ONE_FILE = 0, MULTI_GROUP, MULTI_FILE } EDataOutputType; |
---|
24 | |
---|
25 | /// Ecriture /// |
---|
26 | void writeFile (const boost::shared_ptr<tree::CFile> file); |
---|
27 | void writeField (const boost::shared_ptr<tree::CField> field); |
---|
28 | void writeFieldGrid(const boost::shared_ptr<tree::CField> field); |
---|
29 | void writeFieldData(const boost::shared_ptr<tree::CField> field); |
---|
30 | |
---|
31 | virtual void definition_start(void) = 0; |
---|
32 | virtual void definition_end(void) = 0; |
---|
33 | |
---|
34 | virtual ~CDataOutput(void); |
---|
35 | |
---|
36 | protected: |
---|
37 | |
---|
38 | /// Ecriture /// |
---|
39 | void writeGrid(const boost::shared_ptr<tree::CGrid> grid); |
---|
40 | void writeGrid(const boost::shared_ptr<tree::CDomain> domain, |
---|
41 | const boost::shared_ptr<tree::CAxis> axis); |
---|
42 | void writeGrid(const boost::shared_ptr<tree::CDomain> domain); |
---|
43 | |
---|
44 | virtual void writeFile_ (const boost::shared_ptr<tree::CFile> file) = 0; |
---|
45 | virtual void writeField_ (const boost::shared_ptr<tree::CField> field) = 0; |
---|
46 | virtual void writeFieldData_ (const boost::shared_ptr<tree::CField> field) = 0; |
---|
47 | virtual void writeDomain_ (const boost::shared_ptr<tree::CDomain> domain) = 0; |
---|
48 | virtual void writeAxis_ (const boost::shared_ptr<tree::CAxis> axis) = 0; |
---|
49 | virtual void writeTimeAxis_ (const boost::shared_ptr<tree::CField> field, |
---|
50 | const boost::shared_ptr<date::CCalendar> cal) = 0; |
---|
51 | |
---|
52 | /// Propriétés protégées /// |
---|
53 | EDataOutputType type; |
---|
54 | |
---|
55 | }; // class CDataOutput |
---|
56 | |
---|
57 | } // namespace io |
---|
58 | } // namespace xmlioserver |
---|
59 | |
---|
60 | #endif //__XMLIO_DATA_OUTPUT__ |
---|