source: XIOS/dev/dev_ym/XIOS_COUPLING/src/node/reduce_domain_to_scalar.hpp @ 1984

Last change on this file since 1984 was 1984, checked in by ymipsl, 4 years ago

intermediate commit for new tranformation engine?
YM

File size: 2.5 KB
Line 
1#ifndef __XIOS_CReduceDomainToScalar__
2#define __XIOS_CReduceDomainToScalar__
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
15namespace xios {
16  /// ////////////////////// Déclarations ////////////////////// ///
17  class CReduceDomainToScalarGroup;
18  class CReduceDomainToScalarAttributes;
19  class CReduceDomainToScalar;
20  class CDomain;
21  class CScalar;
22
23  ///--------------------------------------------------------------
24
25  // Declare/Define CFileAttribute
26  BEGIN_DECLARE_ATTRIBUTE_MAP(CReduceDomainToScalar)
27#include "reduce_domain_to_scalar_attribute.conf"
28  END_DECLARE_ATTRIBUTE_MAP(CReduceDomainToScalar)
29
30  ///--------------------------------------------------------------
31  /*!
32    \class CReduceDomainToScalar
33    This class describes reduce_domain in xml file.
34  */
35  class CReduceDomainToScalar
36    : public CObjectTemplate<CReduceDomainToScalar>
37    , public CReduceDomainToScalarAttributes
38    , public CTransformation<CScalar>
39  {
40    public :
41      typedef CObjectTemplate<CReduceDomainToScalar> SuperClass;
42      typedef CReduceDomainToScalarAttributes SuperClassAttribute;
43      typedef CReduceDomainToScalar MyClass ;
44      typedef CTransformation<CScalar> SuperTransform ;
45
46    public :
47      /// Constructeurs ///
48      CReduceDomainToScalar(void);
49      explicit CReduceDomainToScalar(const StdString& id);
50
51      /// Destructeur ///
52      virtual ~CReduceDomainToScalar(void);
53
54      virtual void checkValid(CScalar* scalarDst, CDomain* domainSrc);
55
56      /// Accesseurs statiques ///
57      static StdString GetName(void);
58      static StdString GetDefName(void);
59      static ENodeType GetType(void);
60      const string& getId(void) { return this->SuperClass::getId();}
61      ETranformationType getTransformationType(void) { return TRANS_REDUCE_DOMAIN_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)) ;}
64    private:
65      static bool registerTrans();
66      static CTransformation<CScalar>* create(const StdString& id, xml::CXMLNode* node);
67      static bool _dummyRegistered;
68  }; // class CReduceDomainToScalar
69
70  DECLARE_GROUP(CReduceDomainToScalar);
71} // namespace xios
72
73#endif // __XIOS_CReduceDomainToScalar__
Note: See TracBrowser for help on using the repository browser.