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