[1782] | 1 | #ifndef __XIOS_CCouplerOut__ |
---|
| 2 | #define __XIOS_CCouplerOut__ |
---|
| 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 | |
---|
| 14 | namespace xios |
---|
| 15 | { |
---|
| 16 | |
---|
| 17 | /// ////////////////////// Déclarations ////////////////////// /// |
---|
| 18 | |
---|
| 19 | class CCouplerOutGroup; |
---|
| 20 | class CCouplerOutAttributes; |
---|
| 21 | class CCouplerOut; |
---|
| 22 | |
---|
| 23 | class CGarbageCollector; |
---|
| 24 | |
---|
| 25 | ///-------------------------------------------------------------- |
---|
| 26 | |
---|
| 27 | // Declare/Define CCouplerOutAttribute |
---|
| 28 | BEGIN_DECLARE_ATTRIBUTE_MAP(CCouplerOut) |
---|
| 29 | # include "coupler_out_attribute.conf" |
---|
| 30 | END_DECLARE_ATTRIBUTE_MAP(CCouplerOut) |
---|
| 31 | |
---|
| 32 | ///-------------------------------------------------------------- |
---|
| 33 | |
---|
| 34 | /*! |
---|
| 35 | \class CCouplerOut |
---|
| 36 | |
---|
| 37 | */ |
---|
| 38 | class CCouplerOut |
---|
| 39 | : public CObjectTemplate<CCouplerOut> |
---|
| 40 | , public CCouplerOutAttributes |
---|
| 41 | { |
---|
| 42 | /// typedef /// |
---|
| 43 | typedef CObjectTemplate<CCouplerOut> SuperClass; |
---|
| 44 | typedef CCouplerOutAttributes SuperClassAttribute; |
---|
| 45 | |
---|
| 46 | public : |
---|
| 47 | enum EEventId |
---|
| 48 | { |
---|
| 49 | NO_EVENT |
---|
| 50 | }; |
---|
| 51 | |
---|
| 52 | typedef CCouplerOutAttributes RelAttributes; |
---|
| 53 | typedef CCouplerOutGroup RelGroup; |
---|
| 54 | |
---|
| 55 | /// Constructeurs /// |
---|
| 56 | CCouplerOut(void); |
---|
| 57 | explicit CCouplerOut(const StdString& id); |
---|
| 58 | CCouplerOut(const CCouplerOut& couplerOut); // Not implemented yet. |
---|
| 59 | CCouplerOut(const CCouplerOut* const couplerOut); // Not implemented yet. |
---|
| 60 | |
---|
| 61 | /// Destructeur /// |
---|
| 62 | virtual ~CCouplerOut(void); |
---|
| 63 | |
---|
| 64 | public: |
---|
| 65 | /// Accesseurs /// |
---|
| 66 | CFieldGroup* getVirtualFieldGroup(void) const; |
---|
| 67 | std::vector<CField*> getAllFields(void) const; |
---|
| 68 | std::vector<CField* > getEnabledFields(void); |
---|
| 69 | |
---|
| 70 | StdString dumpClassAttributes(void); |
---|
| 71 | |
---|
| 72 | public : |
---|
| 73 | void setVirtualFieldGroup(CFieldGroup* newVFieldGroup); |
---|
| 74 | |
---|
| 75 | // Add component into coupler |
---|
| 76 | CField* addField(const string& id = ""); |
---|
| 77 | CFieldGroup* addFieldGroup(const string& id = ""); |
---|
| 78 | |
---|
| 79 | public: |
---|
| 80 | /// Accesseurs statiques /// |
---|
| 81 | static StdString GetName(void); |
---|
| 82 | static StdString GetDefName(void); |
---|
| 83 | static ENodeType GetType(void); |
---|
| 84 | public: |
---|
| 85 | /// Traitements /// |
---|
| 86 | virtual void parse(xml::CXMLNode& node); |
---|
| 87 | // virtual StdString toString(void) const; |
---|
| 88 | |
---|
| 89 | public: |
---|
| 90 | |
---|
| 91 | private : |
---|
| 92 | CFieldGroup* virtualFieldGroup; |
---|
| 93 | |
---|
| 94 | // std::shared_ptr<CDataOutput> data_out; |
---|
| 95 | // std::shared_ptr<CDataInput> data_in; |
---|
| 96 | std::vector<CField*> enabledFields; |
---|
| 97 | |
---|
| 98 | |
---|
| 99 | public: |
---|
| 100 | |
---|
| 101 | }; // class CCouplerOut |
---|
| 102 | |
---|
| 103 | ///-------------------------------------------------------------- |
---|
| 104 | |
---|
| 105 | // Declare/Define CFileGroup and CFileDefinition |
---|
| 106 | DECLARE_GROUP(CCouplerOut); |
---|
| 107 | |
---|
| 108 | ///-------------------------------------------------------------- |
---|
| 109 | |
---|
| 110 | } // namespace xios |
---|
| 111 | |
---|
| 112 | #endif // __XIOS_CCouplingIn__ |
---|