1 | #ifndef __XIOS_CReorderDomain__ |
---|
2 | #define __XIOS_CReorderDomain__ |
---|
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 | #include "domain.hpp" |
---|
15 | |
---|
16 | namespace xios { |
---|
17 | /// ////////////////////// Déclarations ////////////////////// /// |
---|
18 | class CReorderDomainGroup; |
---|
19 | class CReorderDomainAttributes; |
---|
20 | class CReorderDomain; |
---|
21 | class CDomain; |
---|
22 | class CGenericAlgorithmTransformation ; |
---|
23 | class CGrid; |
---|
24 | ///-------------------------------------------------------------- |
---|
25 | |
---|
26 | // Declare/Define CReorderDomainAttribute |
---|
27 | BEGIN_DECLARE_ATTRIBUTE_MAP(CReorderDomain) |
---|
28 | #include "reorder_domain_attribute.conf" |
---|
29 | END_DECLARE_ATTRIBUTE_MAP(CReorderDomain) |
---|
30 | |
---|
31 | ///-------------------------------------------------------------- |
---|
32 | /*! |
---|
33 | \class CReorderDomain |
---|
34 | This class describes reorder_domain in xml file. |
---|
35 | */ |
---|
36 | class CReorderDomain |
---|
37 | : public CObjectTemplate<CReorderDomain> |
---|
38 | , public CReorderDomainAttributes |
---|
39 | , public CTransformation<CDomain> |
---|
40 | { |
---|
41 | public : |
---|
42 | typedef CObjectTemplate<CReorderDomain> SuperClass; |
---|
43 | typedef CReorderDomainAttributes SuperClassAttribute; |
---|
44 | typedef CReorderDomain MyClass ; |
---|
45 | typedef CTransformation<CDomain> SuperTransform ; |
---|
46 | |
---|
47 | public : |
---|
48 | /// Constructeurs /// |
---|
49 | CReorderDomain(void); |
---|
50 | explicit CReorderDomain(const StdString& id); |
---|
51 | |
---|
52 | /// Destructeur /// |
---|
53 | virtual ~CReorderDomain(void); |
---|
54 | |
---|
55 | virtual void checkValid(CDomain* domainSrc); |
---|
56 | |
---|
57 | /// Accesseurs statiques /// |
---|
58 | static StdString GetName(void); |
---|
59 | static StdString GetDefName(void); |
---|
60 | static ENodeType GetType(void); |
---|
61 | const string& getId(void) { return this->SuperClass::getId();} |
---|
62 | ETranformationType getTransformationType(void) { return TRANS_REORDER_DOMAIN ;} |
---|
63 | static CTransformation<CDomain>* getTransformation(const StdString& id) { return SuperClass::get(id);} |
---|
64 | virtual void inheritFrom(SuperTransform* srcTransform) { solveDescInheritance(true, this->SuperClass::get((MyClass*)srcTransform)) ;} |
---|
65 | virtual shared_ptr<CGenericAlgorithmTransformation> createAlgorithm(bool isSource, |
---|
66 | CGrid* gridDst, CGrid* gridSrc, |
---|
67 | int elementPositionInGrid, |
---|
68 | std::map<int, int>& elementPositionInGridSrc2ScalarPosition, |
---|
69 | std::map<int, int>& elementPositionInGridSrc2AxisPosition, |
---|
70 | std::map<int, int>& elementPositionInGridSrc2DomainPosition, |
---|
71 | std::map<int, int>& elementPositionInGridDst2ScalarPosition, |
---|
72 | std::map<int, int>& elementPositionInGridDst2AxisPosition, |
---|
73 | std::map<int, int>& elementPositionInGridDst2DomainPosition) ; |
---|
74 | private: |
---|
75 | static bool registerTrans(); |
---|
76 | static CTransformation<CDomain>* create(const StdString& id, xml::CXMLNode* node); |
---|
77 | static bool _dummyRegistered; |
---|
78 | }; // class CReorderDomain |
---|
79 | |
---|
80 | DECLARE_GROUP(CReorderDomain); |
---|
81 | } // namespace xios |
---|
82 | |
---|
83 | #endif // __XIOS_CReorderDomain__ |
---|