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

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

intermediate commit for new tranformation engine?
YM

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