source: XMLIO_V2/dev/dev_rv/src/xmlio/output/nc4_data_output.hpp @ 201

Last change on this file since 201 was 201, checked in by hozdoba, 13 years ago
File size: 3.6 KB
Line 
1#ifndef __XMLIO_NC4_DATA_OUTPUT__
2#define __XMLIO_NC4_DATA_OUTPUT__
3
4/// xmlioserver headers ///
5#include "xmlioserver_spl.hpp"
6#include "onetcdf4.hpp"
7#include "data_output.hpp"
8
9namespace xmlioserver
10{
11   namespace io
12   {
13      /// ////////////////////// Déclarations ////////////////////// ///
14
15      class CNc4DataOutput
16         : protected CONetCDF4
17         , public virtual CDataOutput
18      {
19         public :
20
21            /// Définition de type ///
22            typedef CONetCDF4   SuperClassWriter;
23            typedef CDataOutput SuperClass;
24
25            /// Constructeurs ///
26            CNc4DataOutput
27               (const StdString & filename, bool exist);
28            CNc4DataOutput
29               (const StdString & filename, bool exist, bool multigroup, MPI_Comm comm_server);
30            CNc4DataOutput
31               (const StdString & filename, bool exist, bool multigroup, comm::MPIComm comm_server, bool);
32
33            CNc4DataOutput(const CNc4DataOutput & dataoutput);       // Not implemented.
34            CNc4DataOutput(const CNc4DataOutput * const dataoutput); // Not implemented.
35
36            /// Accesseur ///
37            const StdString & getFileName(void) const;
38
39            /// Destructeur ///
40            virtual ~CNc4DataOutput(void);
41
42         protected :
43
44            /// Ecriture ///
45            virtual void writeDomain_    (const boost::shared_ptr<tree::CDomain> domain);
46            virtual void writeAxis_      (const boost::shared_ptr<tree::CAxis>   axis);
47            virtual void writeField_     (const boost::shared_ptr<tree::CField>  field);
48            virtual void writeFieldData_ (const boost::shared_ptr<tree::CField>  field);
49            virtual void writeFile_      (const boost::shared_ptr<tree::CFile>   file);
50
51
52         protected :
53         
54            void writeLocalAttributes(int ibegin, int ni, int jbegin, int nj, StdString domid);
55
56            void writeFileAttributes(const StdString & name,
57                                     const StdString & description,
58                                     const StdString & conventions,
59                                     const StdString & production,
60                                     const StdString & timeStamp);
61
62            void writeMaskAttributes(const StdString & mask_name,
63                                     int data_dim,
64                                     int data_ni     = 0,
65                                     int data_nj     = 0,
66                                     int data_ibegin = 0,
67                                     int data_jbegin = 0);
68
69            void writeAxisAttributes(const StdString & axis_name,
70                                     const StdString & axis,
71                                     const StdString & standard_name,
72                                     const StdString & long_name,
73                                     const StdString & units,
74                                     const StdString & nav_model);
75            template <class T>
76               void writeAxisData(const StdString & axis_name,
77                                  const ARRAY(T, 1) data,
78                                  bool collective, StdSize record,
79                                  const std::vector<StdSize> * start = NULL,
80                                  const std::vector<StdSize> * count = NULL);
81
82         private :
83
84            /// Traitement ///
85            StdString getTimeStamp(void) const;
86
87            /// Propriétés privées ///
88            MPI_Comm comm_server;
89            const StdString filename;
90
91      }; // class CNc4DataOutput
92
93   } // namespace io
94} // namespace xmlioserver
95
96#endif //__XMLIO_NC4_DATA_OUTPUT__
Note: See TracBrowser for help on using the repository browser.