XIOS  1.0
Xml I/O Server
 Tout Classes Espaces de nommage Fichiers Fonctions Variables Définitions de type Énumérations Valeurs énumérées Amis Macros
reduce_axis_to_axis.cpp
Aller à la documentation de ce fichier.
2 #include "type.hpp"
3 #include "axis.hpp"
4 
5 namespace xios {
6 
8 
10  : CObjectTemplate<CReduceAxisToAxis>(), CReduceAxisToAxisAttributes(), CTransformation<CAxis>()
11  { /* Ne rien faire de plus */ }
12 
14  : CObjectTemplate<CReduceAxisToAxis>(id), CReduceAxisToAxisAttributes(), CTransformation<CAxis>()
15  { /* Ne rien faire de plus */ }
16 
18  {}
19 
21  {
22  CReduceAxisToAxis* reduceAxis = CReduceAxisToAxisGroup::get("reduce_axis_to_axis_definition")->createChild(id);
23  if (node) reduceAxis->parse(*node);
24  return static_cast<CTransformation<CAxis>*>(reduceAxis);
25  }
26 
28  {
30  }
31 
33 
34  //----------------------------------------------------------------
35 
36  StdString CReduceAxisToAxis::GetName(void) { return StdString("reduce_axis_to_axis"); }
37  StdString CReduceAxisToAxis::GetDefName(void) { return StdString("reduce_axis_to_axis"); }
39 
40  void CReduceAxisToAxis::checkValid(CAxis* axisDst, CAxis* axisSrc)
41  {
42 
43  if (this->operation.isEmpty())
44  ERROR("CReduceAxisToAxis::checkValid(CAxis* axisDst, CAxis* axisSrc)",
45  << "An operation must be defined."
46  << "Axis source " <<axisSrc->getId() << std::endl
47  << "Axis destination " << axisDst->getId());
48 
49 
50  if (axisDst->n_glo != axisSrc->n_glo)
51  ERROR("CReduceAxisToAxis::checkValid(CAxis* axisDst, CAxis* axisSrc)",
52  << "both axis should have same n_glo"
53  << "Axis source " <<axisSrc->getId() << " has n_glo " << axisSrc->n_glo << std::endl
54  << "Axis destination " << axisDst->getId() << " has n_glo " << axisDst->n_glo);
55 
56  }
57 
58 }
static CTransformation< CAxis > * create(const StdString &id, xml::CXMLNode *node)
static ENodeType GetType(void)
std::string StdString
Definition: xios_spl.hpp:48
#define xios(arg)
static StdString GetDefName(void)
virtual void checkValid(CAxis *axisDst, CAxis *axisSrc)
const StdString & getId(void) const
Accesseurs ///.
Definition: object.cpp:26
static StdString GetName(void)
Accesseurs statiques ///.
CATCH CScalarAlgorithmReduceScalar::CScalarAlgorithmReduceScalar(CScalar *scalarDestination, CScalar *scalarSource, CReduceScalarToScalar *algo ERROR)("CScalarAlgorithmReduceScalar::CScalarAlgorithmReduceScalar(CScalar* scalarDestination, CScalar* scalarSource, CReduceScalarToScalar* algo)",<< "Operation must be defined."<< "Scalar source "<< scalarSource->getId()<< std::endl<< "Scalar destination "<< scalarDestination->getId())
////////////////////// Déclarations ////////////////////// ///
CReduceAxisToAxis(void)
Constructeurs ///.
virtual void parse(xml::CXMLNode &node)
enum xios::_node_type ENodeType
////////////////////// Définitions ////////////////////// ///
static bool registerTransformation(ETranformationType transType, CreateTransformationCallBack createFn)
virtual ~CReduceAxisToAxis(void)
Destructeur ///.