source: XIOS/trunk/src/node/axis.cpp @ 313

Last change on this file since 313 was 313, checked in by ymipsl, 12 years ago

Fortran attribut interface are now automaticaly generated.
Add get attribut fonctionnality from fortran.

YM

File size: 1.9 KB
Line 
1#include "axis.hpp"
2
3#include "attribute_template_impl.hpp"
4#include "object_template_impl.hpp"
5#include "group_template_impl.hpp"
6#include "transfert_parameters.hpp"
7
8namespace xmlioserver {
9namespace tree {
10   
11   /// ////////////////////// Définitions ////////////////////// ///
12
13   CAxis::CAxis(void)
14      : CObjectTemplate<CAxis>()
15      , CAxisAttributes(), isChecked(false), relFiles()
16   { /* Ne rien faire de plus */ }
17
18   CAxis::CAxis(const StdString & id)
19      : CObjectTemplate<CAxis>(id)
20      , CAxisAttributes(), isChecked(false), relFiles()
21   { /* Ne rien faire de plus */ }
22
23   CAxis::~CAxis(void)
24   { /* Ne rien faire de plus */ }
25
26   ///---------------------------------------------------------------
27
28   const std::set<StdString> & CAxis::getRelFiles(void) const
29   {
30      return (this->relFiles);
31   }
32
33   bool CAxis::IsWritten(const StdString & filename) const
34   {
35      return (this->relFiles.find(filename) != this->relFiles.end());
36   }
37
38   void CAxis::addRelFile(const StdString & filename)
39   {
40      this->relFiles.insert(filename);
41   }
42
43   //----------------------------------------------------------------
44
45   StdString CAxis::GetName(void)   { return (StdString("axis")); }
46   StdString CAxis::GetDefName(void){ return (CAxis::GetName()); }
47   ENodeType CAxis::GetType(void)   { return (eAxis); }
48
49   //----------------------------------------------------------------
50
51   void CAxis::checkAttributes(void)
52   {
53      if (this->isChecked) return;
54      StdSize size = this->size.getValue();
55      StdSize true_size = value.getValue()->num_elements();
56      if (size != true_size)
57         ERROR("CAxis::checkAttributes(void)",
58               << "Le tableau \'value\' a une taille différente de celle indiquée dans l'attribut \'size\'")
59
60      this->isChecked = true;
61   }
62
63   ///---------------------------------------------------------------
64
65} // namespace tree
66} // namespace xmlioserver
Note: See TracBrowser for help on using the repository browser.