source: XIOS/dev/dev_ym/XIOS_COUPLING/src/data_input.hpp @ 1882

Last change on this file since 1882 was 1882, checked in by ymipsl, 4 years ago

Xios coupling branch
Refactor and simplify file writer filter management on server side.

YM

File size: 1.0 KB
Line 
1#ifndef __XIOS_DATA_INPUT__
2#define __XIOS_DATA_INPUT__
3
4/// XIOS headers ///
5#include "xios_spl.hpp"
6#include "exception.hpp"
7#include "field.hpp"
8
9
10namespace xios
11{
12  class CDataInput
13  {
14    public:
15      /// Input type ///
16      typedef enum { ONE_FILE = 0, MULTI_GROUP, MULTI_FILE } EDataInputType;
17
18      /// Read methods ///
19      StdSize getFieldNbRecords(CField* field);
20      void readFieldData(CField* field, CArray<double,1>& data);
21      void readFieldAttributesMetaData(CField* field);
22      void readFieldAttributesValues(CField* field);
23      void closeFile(void);
24
25      virtual ~CDataInput(void);
26
27    protected:
28      virtual StdSize getFieldNbRecords_(CField* field) = 0;
29      virtual void readFieldData_(CField* field, CArray<double,1>& data) = 0;
30      virtual void readFieldAttributes_(CField* field, bool readAttributeValues) = 0;
31      virtual void closeFile_(void) = 0;
32
33      /// Protected properties ///
34      EDataInputType type;
35  }; // class CDataInput
36} // namespace xios
37
38#endif //__XIOS_DATA_INPUT__
Note: See TracBrowser for help on using the repository browser.