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