source: XIOS/dev/dev_ym/XIOS_COUPLING/src/node/coupler_in.hpp @ 1782

Last change on this file since 1782 was 1782, checked in by ymipsl, 5 years ago

coupling branch : implement new objet coupler_in and coupler_out to be properly parsed from XML file.

YM

  • Property svn:executable set to *
File size: 3.4 KB
Line 
1#ifndef __XIOS_CCouplerIn__
2#define __XIOS_CCouplerIn__
3
4/// XIOS headers ///
5#include "xios_spl.hpp"
6#include "field.hpp"
7#include "declare_group.hpp"
8#include "date.hpp"
9#include "attribute_enum.hpp"
10#include "attribute_enum_impl.hpp"
11#include "context_client.hpp"
12#include "mpi.hpp"
13
14namespace xios
15{
16
17   /// ////////////////////// Déclarations ////////////////////// ///
18
19   class CCouplerInGroup;
20   class CCouplerInAttributes;
21   class CCouplerIn;
22
23   class CGarbageCollector;
24
25   ///--------------------------------------------------------------
26
27   // Declare/Define CCouplerInAttribute
28   BEGIN_DECLARE_ATTRIBUTE_MAP(CCouplerIn)
29#  include "coupler_in_attribute.conf"
30   END_DECLARE_ATTRIBUTE_MAP(CCouplerIn)
31
32   ///--------------------------------------------------------------
33
34   /*!
35   \class CCouplerIn
36   This class corresponds to file component of the xml.
37   The class contains all the nessceary information to write data into a netcdf file: The most important thing
38   is the field(s) which will be written into file. Besides, there are some options to write
39   data into file, e.g: writting into only one file or multiple file; splitting a running into several files.
40   Moreover, there are some other attributes of netcdf file which are also stored in this class
41   */
42   class CCouplerIn
43      : public CObjectTemplate<CCouplerIn>
44      , public CCouplerInAttributes
45   {
46         /// typedef ///
47         typedef CObjectTemplate<CCouplerIn>   SuperClass;
48         typedef CCouplerInAttributes SuperClassAttribute;
49
50      public :
51         enum EEventId
52         {
53           NO_EVENT
54         };
55
56         typedef CCouplerInAttributes RelAttributes;
57         typedef CCouplerInGroup      RelGroup;
58
59         /// Constructeurs ///
60         CCouplerIn(void);
61         explicit CCouplerIn(const StdString& id);
62         CCouplerIn(const CCouplerIn& couplerIn);       // Not implemented yet.
63         CCouplerIn(const CCouplerIn* const couplerIn); // Not implemented yet.
64
65         /// Destructeur ///
66         virtual ~CCouplerIn(void);
67
68      public:
69         /// Accesseurs ///
70         CFieldGroup* getVirtualFieldGroup(void) const;
71         std::vector<CField*> getAllFields(void) const;
72         std::vector<CField* > getEnabledFields(void);
73
74         StdString dumpClassAttributes(void);
75
76      public :
77         void setVirtualFieldGroup(CFieldGroup* newVFieldGroup);
78
79         // Add component into coupler
80         CField* addField(const string& id = "");
81         CFieldGroup* addFieldGroup(const string& id = "");
82
83      public:
84         /// Accesseurs statiques ///
85         static StdString GetName(void);
86         static StdString GetDefName(void);
87         static ENodeType GetType(void);
88      public:
89         /// Traitements ///
90         virtual void parse(xml::CXMLNode& node);
91//         virtual StdString toString(void) const;
92
93      public:
94
95      private :
96         CFieldGroup* virtualFieldGroup;
97
98//         std::shared_ptr<CDataOutput> data_out;
99//         std::shared_ptr<CDataInput> data_in;
100         std::vector<CField*> enabledFields;
101
102
103      public:
104
105   }; // class CCouplerIn
106
107   ///--------------------------------------------------------------
108
109   // Declare/Define CCouplerInGroup and CCouplerInDefinition
110   DECLARE_GROUP(CCouplerIn);
111
112   ///--------------------------------------------------------------
113
114} // namespace xios
115
116#endif // __XIOS_CCouplingIn__
Note: See TracBrowser for help on using the repository browser.