[1314] | 1 | #ifndef __XIOS_CReduceScalarToScalar__ |
---|
| 2 | #define __XIOS_CReduceScalarToScalar__ |
---|
| 3 | |
---|
| 4 | /// xios headers /// |
---|
| 5 | #include "xios_spl.hpp" |
---|
| 6 | #include "attribute_enum.hpp" |
---|
| 7 | #include "attribute_enum_impl.hpp" |
---|
| 8 | #include "attribute_array.hpp" |
---|
| 9 | #include "declare_attribute.hpp" |
---|
| 10 | #include "object_template.hpp" |
---|
| 11 | #include "group_factory.hpp" |
---|
| 12 | #include "declare_group.hpp" |
---|
| 13 | #include "transformation.hpp" |
---|
| 14 | |
---|
| 15 | namespace xios { |
---|
| 16 | /// ////////////////////// Déclarations ////////////////////// /// |
---|
| 17 | class CReduceScalarToScalarGroup; |
---|
| 18 | class CReduceScalarToScalarAttributes; |
---|
| 19 | class CReduceScalarToScalar; |
---|
| 20 | class CScalar; |
---|
[2011] | 21 | class CGenericAlgorithmTransformation ; |
---|
| 22 | class CGrid; |
---|
[1314] | 23 | ///-------------------------------------------------------------- |
---|
| 24 | |
---|
| 25 | // Declare/Define CFileAttribute |
---|
| 26 | BEGIN_DECLARE_ATTRIBUTE_MAP(CReduceScalarToScalar) |
---|
| 27 | #include "reduce_scalar_to_scalar_attribute.conf" |
---|
| 28 | END_DECLARE_ATTRIBUTE_MAP(CReduceScalarToScalar) |
---|
| 29 | |
---|
| 30 | ///-------------------------------------------------------------- |
---|
| 31 | /*! |
---|
| 32 | \class CReduceScalarToScalar |
---|
| 33 | This class describes reduce_scalar in xml file. |
---|
| 34 | */ |
---|
| 35 | class CReduceScalarToScalar |
---|
| 36 | : public CObjectTemplate<CReduceScalarToScalar> |
---|
| 37 | , public CReduceScalarToScalarAttributes |
---|
| 38 | , public CTransformation<CScalar> |
---|
| 39 | { |
---|
| 40 | public : |
---|
| 41 | typedef CObjectTemplate<CReduceScalarToScalar> SuperClass; |
---|
| 42 | typedef CReduceScalarToScalarAttributes SuperClassAttribute; |
---|
[1984] | 43 | typedef CReduceScalarToScalar MyClass ; |
---|
| 44 | typedef CTransformation<CScalar> SuperTransform ; |
---|
[1314] | 45 | |
---|
| 46 | public : |
---|
| 47 | /// Constructeurs /// |
---|
| 48 | CReduceScalarToScalar(void); |
---|
| 49 | explicit CReduceScalarToScalar(const StdString& id); |
---|
| 50 | |
---|
| 51 | /// Destructeur /// |
---|
| 52 | virtual ~CReduceScalarToScalar(void); |
---|
| 53 | |
---|
| 54 | virtual void checkValid(CScalar* scalarDst); |
---|
| 55 | |
---|
| 56 | /// Accesseurs statiques /// |
---|
| 57 | static StdString GetName(void); |
---|
| 58 | static StdString GetDefName(void); |
---|
| 59 | static ENodeType GetType(void); |
---|
[1984] | 60 | const string& getId(void) { return this->SuperClass::getId();} |
---|
| 61 | ETranformationType getTransformationType(void) { return TRANS_REDUCE_SCALAR_TO_SCALAR ;} |
---|
| 62 | static CTransformation<CScalar>* getTransformation(const StdString& id) { return SuperClass::get(id);} |
---|
| 63 | virtual void inheritFrom(SuperTransform* srcTransform) { solveDescInheritance(true, this->SuperClass::get((MyClass*)srcTransform)) ;} |
---|
[2011] | 64 | virtual CGenericAlgorithmTransformation* createAlgorithm(bool isSource, |
---|
| 65 | CGrid* gridDst, CGrid* gridSrc, |
---|
| 66 | int elementPositionInGrid, |
---|
| 67 | std::map<int, int>& elementPositionInGridSrc2ScalarPosition, |
---|
| 68 | std::map<int, int>& elementPositionInGridSrc2AxisPosition, |
---|
| 69 | std::map<int, int>& elementPositionInGridSrc2DomainPosition, |
---|
| 70 | std::map<int, int>& elementPositionInGridDst2ScalarPosition, |
---|
| 71 | std::map<int, int>& elementPositionInGridDst2AxisPosition, |
---|
| 72 | std::map<int, int>& elementPositionInGridDst2DomainPosition) ; |
---|
[1314] | 73 | private: |
---|
| 74 | static bool registerTrans(); |
---|
| 75 | static CTransformation<CScalar>* create(const StdString& id, xml::CXMLNode* node); |
---|
| 76 | static bool _dummyRegistered; |
---|
| 77 | }; // class CReduceScalarToScalar |
---|
| 78 | |
---|
| 79 | DECLARE_GROUP(CReduceScalarToScalar); |
---|
| 80 | } // namespace xios |
---|
| 81 | |
---|
| 82 | #endif // __XIOS_CReduceScalarToScalar__ |
---|