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