source: XIOS/dev/XIOS_DEV_CMIP6/src/node/duplicate_scalar_to_axis.hpp @ 1314

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

Add 2 new spatial transformations :

  • reduce_scalar_to_scalar : global reduction between scalar
  • duplicate_scalar_to_axis : a scalar value is duplicated on each level of the axis.

YM

File size: 2.0 KB
Line 
1#ifndef __XIOS_CDuplicateScalarToAxis__
2#define __XIOS_CDuplicateScalarToAxis__
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 CDuplicateScalarToAxisGroup;
18  class CDuplicateScalarToAxisAttributes;
19  class CDuplicateScalarToAxis;
20  class CAxis;
21  class CScalar;
22
23  ///--------------------------------------------------------------
24
25  // Declare/Define CFileAttribute
26  BEGIN_DECLARE_ATTRIBUTE_MAP(CDuplicateScalarToAxis)
27#include "duplicate_scalar_to_axis_attribute.conf"
28  END_DECLARE_ATTRIBUTE_MAP(CDuplicateScalarToAxis)
29
30  ///--------------------------------------------------------------
31  /*!
32    \class CDuplicateScalarToAxis
33    This class describes duplicate_scalar in xml file.
34  */
35  class CDuplicateScalarToAxis
36    : public CObjectTemplate<CDuplicateScalarToAxis>
37    , public CDuplicateScalarToAxisAttributes
38    , public CTransformation<CAxis>
39  {
40    public :
41      typedef CObjectTemplate<CDuplicateScalarToAxis> SuperClass;
42      typedef CDuplicateScalarToAxisAttributes SuperClassAttribute;
43
44    public :
45      /// Constructeurs ///
46      CDuplicateScalarToAxis(void);
47      explicit CDuplicateScalarToAxis(const StdString& id);
48
49      /// Destructeur ///
50      virtual ~CDuplicateScalarToAxis(void);
51
52      virtual void checkValid(CAxis* axisDst, CScalar* scalarSrc);
53
54      /// Accesseurs statiques ///
55      static StdString GetName(void);
56      static StdString GetDefName(void);
57      static ENodeType GetType(void);
58    private:
59      static bool registerTrans();
60      static CTransformation<CAxis>* create(const StdString& id, xml::CXMLNode* node);
61      static bool _dummyRegistered;
62  }; // class CReduceAxisToAxis
63
64  DECLARE_GROUP(CDuplicateScalarToAxis);
65} // namespace xios
66
67#endif // ___XIOS_CDuplicateScalarToAxis__
Note: See TracBrowser for help on using the repository browser.