source: XIOS/trunk/src/node/reduce_axis_to_scalar.cpp @ 980

Last change on this file since 980 was 980, checked in by mhnguyen, 4 years ago

Minor improvements:

+) Change some type of variable to avoid some error-prone inputs
+) Change some class name to make it meaningful

Test
+) On Curie
+) Okie

File size: 1.5 KB
Line 
1#include "reduce_axis_to_scalar.hpp"
2#include "type.hpp"
3
4namespace xios {
5
6  /// ////////////////////// Définitions ////////////////////// ///
7
8  CReduceAxisToScalar::CReduceAxisToScalar(void)
9    : CObjectTemplate<CReduceAxisToScalar>(), CReduceAxisToScalarAttributes(), CTransformation<CScalar>()
10  { /* Ne rien faire de plus */ }
11
12  CReduceAxisToScalar::CReduceAxisToScalar(const StdString & id)
13    : CObjectTemplate<CReduceAxisToScalar>(id), CReduceAxisToScalarAttributes(), CTransformation<CScalar>()
14  { /* Ne rien faire de plus */ }
15
16  CReduceAxisToScalar::~CReduceAxisToScalar(void)
17  {}
18
19  CTransformation<CScalar>* CReduceAxisToScalar::create(const StdString& id, xml::CXMLNode* node)
20  {
21    CReduceAxisToScalar* reduceAxis = CReduceAxisToScalarGroup::get("reduce_axis_to_scalar_definition")->createChild(id);
22    if (node) reduceAxis->parse(*node);
23    return static_cast<CTransformation<CScalar>*>(reduceAxis);
24  }
25
26  bool CReduceAxisToScalar::registerTrans()
27  {
28    return registerTransformation(TRANS_REDUCE_AXIS_TO_SCALAR, CReduceAxisToScalar::create);
29  }
30
31  bool CReduceAxisToScalar::_dummyRegistered = CReduceAxisToScalar::registerTrans();
32
33  //----------------------------------------------------------------
34
35  StdString CReduceAxisToScalar::GetName(void)    { return StdString("reduce_axis_to_scalar"); }
36  StdString CReduceAxisToScalar::GetDefName(void) { return StdString("reduce_axis_to_scalar"); }
37  ENodeType CReduceAxisToScalar::GetType(void)    { return eReduceAxisToScalar; }
38
39  void CReduceAxisToScalar::checkValid(CScalar* scalarDst)
40  {
41  }
42
43}
Note: See TracBrowser for help on using the repository browser.