Changeset 566 for XIOS/branchs
- Timestamp:
- 03/09/15 10:04:51 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/branchs/xios-1.0/src/node/axis.cpp
r501 r566 9 9 10 10 namespace xios { 11 11 12 12 /// ////////////////////// Définitions ////////////////////// /// 13 13 … … 54 54 if (this->isChecked) return; 55 55 if (this->size.isEmpty()) 56 ERROR("CAxis::checkAttributes(void)",<< "Attribut <size> of the axis must be specified") ; 56 ERROR("CAxis::checkAttributes(void)", 57 << "Attribute <size> of the axis [ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] must be specified"); 57 58 StdSize size = this->size.getValue(); 58 59 StdSize zoom_begin,zoom_end, zoom_size 60 61 zoom_begin = (this->zoom_begin.isEmpty()) ? 1 : this->zoom_begin.getValue() 62 zoom_end = (this->zoom_end.isEmpty()) ? size : this->zoom_end.getValue() ;63 zoom_size = (this->zoom_size.isEmpty()) ? size : this->zoom_size.getValue() 64 65 if (this->zoom_begin.isEmpty()) zoom_begin=zoom_end-zoom_size+1 66 if (this->zoom_end.isEmpty()) zoom_end=zoom_begin+zoom_size-1 67 if (this->zoom_size.isEmpty()) zoom_size=zoom_end-zoom_begin+1 68 59 60 StdSize zoom_begin,zoom_end, zoom_size; 61 62 zoom_begin = (this->zoom_begin.isEmpty()) ? 1 : this->zoom_begin.getValue(); 63 zoom_end = (this->zoom_end.isEmpty()) ? size : this->zoom_end.getValue(); 64 zoom_size = (this->zoom_size.isEmpty()) ? size : this->zoom_size.getValue(); 65 66 if (this->zoom_begin.isEmpty()) zoom_begin=zoom_end-zoom_size+1; 67 if (this->zoom_end.isEmpty()) zoom_end=zoom_begin+zoom_size-1; 68 if (this->zoom_size.isEmpty()) zoom_size=zoom_end-zoom_begin+1; 69 69 70 if ( (zoom_begin < 1) || (zoom_begin > size) || (zoom_end<1) || (zoom_end>size) || (zoom_size<1) || (zoom_size>size) || (zoom_begin>zoom_end)) 70 ERROR("CAxis::checkAttributes(void)",<< "One or more attribut of <zoom_begin>, <zoom_end>, <zoom_size>, are not well specified") ; 71 this->zoom_begin.setValue(zoom_begin) ; 72 this->zoom_end.setValue(zoom_end) ; 73 this->zoom_size.setValue(zoom_size) ; 74 71 ERROR("CAxis::checkAttributes(void)", 72 << "One or more attributes among <zoom_begin>, <zoom_end>, <zoom_size> of axis [ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] are not well specified"); 73 this->zoom_begin.setValue(zoom_begin); 74 this->zoom_end.setValue(zoom_end); 75 this->zoom_size.setValue(zoom_size); 76 75 77 StdSize true_size = value.numElements(); 76 78 if (size != true_size) 77 79 ERROR("CAxis::checkAttributes(void)", 78 << "The array \'value\' has a different size that the one defined by the \'size\' attribut")80 << "The array \'value\' of axis [ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] has a different size that the one defined by the \'size\' attribute"); 79 81 80 82 this->isChecked = true;
Note: See TracChangeset
for help on using the changeset viewer.