[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: |
---|
[1784] | 90 | virtual void solveDescInheritance(bool apply, const CAttributeMap* const parent = 0); |
---|
| 91 | void solveFieldRefInheritance(bool apply); |
---|
| 92 | void createInterCommunicator(void) ; |
---|
| 93 | void solveOnlyRefOfEnabledFields(void); |
---|
| 94 | void generateNewTransformationGridDest(void); |
---|
| 95 | void solveAllRefOfEnabledFieldsAndTransform() ; |
---|
| 96 | void buildFilterGraphOfEnabledFields(CGarbageCollector& gc); |
---|
| 97 | void checkGridOfEnabledFields(void) ; |
---|
[1875] | 98 | void assignContext(void) ; |
---|
| 99 | private: |
---|
| 100 | // the contextClient associated to the context Id attribute |
---|
| 101 | CContextClient* client_=nullptr ; |
---|
| 102 | public: |
---|
| 103 | CContextClient* getContextClient(void) {return client_; } |
---|
| 104 | |
---|
| 105 | private: |
---|
| 106 | string couplingContextId_ ; |
---|
| 107 | public: |
---|
| 108 | const string& getCouplingContextId(void) ; |
---|
| 109 | private: |
---|
[1782] | 110 | CFieldGroup* virtualFieldGroup; |
---|
| 111 | |
---|
| 112 | // std::shared_ptr<CDataOutput> data_out; |
---|
| 113 | // std::shared_ptr<CDataInput> data_in; |
---|
| 114 | std::vector<CField*> enabledFields; |
---|
| 115 | |
---|
| 116 | |
---|
| 117 | public: |
---|
| 118 | |
---|
| 119 | }; // class CCouplerOut |
---|
| 120 | |
---|
| 121 | ///-------------------------------------------------------------- |
---|
| 122 | |
---|
| 123 | // Declare/Define CFileGroup and CFileDefinition |
---|
| 124 | DECLARE_GROUP(CCouplerOut); |
---|
| 125 | |
---|
| 126 | ///-------------------------------------------------------------- |
---|
| 127 | |
---|
| 128 | } // namespace xios |
---|
| 129 | |
---|
[1875] | 130 | #endif // __XIOS_CCouplingIn__2 |
---|