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

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

Mise à jour depuis un autre dépôt

File size: 3.4 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);
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 writeFile_  (const boost::shared_ptr<tree::CFile>   file);
49
50            void writeLocalAttributes(int ibegin, int iend, int jbegin, int jend, StdString domid);
51
52            void writeFileAttributes(const StdString & name,
53                                     const StdString & description,
54                                     const StdString & conventions,
55                                     const StdString & production,
56                                     const StdString & timeStamp);
57
58            void writeMaskAttributes(const StdString & mask_name,
59                                     int data_dim,
60                                     int data_ni,
61                                     int data_nj,
62                                     int data_ibegin,
63                                     int data_jbegin);
64
65            void writeAxisAttributes(const StdString & axis_name,
66                                     const StdString & axis,
67                                     const StdString & standard_name,
68                                     const StdString & long_name,
69                                     const StdString & units,
70                                     const StdString & nav_model);
71            template <class T>
72               void writeAxisData(const StdString & axis_name,
73                                  const ARRAY(T, 1) data,
74                                  bool collective, StdSize record,
75                                  const std::vector<StdSize> * start = NULL,
76                                  const std::vector<StdSize> * count = NULL);
77
78         private :
79
80            /// Traitement ///
81            StdString getTimeStamp(void) const;
82
83            /// Propriétés privées ///
84            MPI_Comm comm_server;
85            const StdString filename;
86
87      }; // class CNc4DataOutput
88
89   } // namespace io
90} // namespace xmlioserver
91
92#endif //__XMLIO_NC4_DATA_OUTPUT__
Note: See TracBrowser for help on using the repository browser.