Changeset 621 for XIOS/trunk/src/node/axis.cpp
- Timestamp:
- 06/22/15 13:36:21 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/node/axis.cpp
r620 r621 18 18 , CAxisAttributes(), isChecked(false), relFiles(), baseRefObject(), areClientAttributesChecked_(false) 19 19 , isDistributed_(false) 20 { /* Ne rien faire de plus */ } 20 , transformationMap_() 21 { 22 } 21 23 22 24 CAxis::CAxis(const StdString & id) … … 24 26 , CAxisAttributes(), isChecked(false), relFiles(), baseRefObject(), areClientAttributesChecked_(false) 25 27 , isDistributed_(false) 26 { /* Ne rien faire de plus */ } 28 , transformationMap_() 29 { 30 } 27 31 28 32 CAxis::~CAxis(void) … … 308 312 bool CAxis::hasTransformation() 309 313 { 310 return (!transformations_.empty()); 311 } 312 313 void CAxis::setTransformations(const std::vector<CTransformation*>& transformations) 314 { 315 transformations_ = transformations; 316 } 317 318 std::vector<CTransformation*> CAxis::getAllTransformations(void) 319 { 320 if (!hasTransformation()) 321 setTransformations(this->getVirtualTransformationGroup()->getAllChildren()); 322 323 return transformations_; 314 return (!transformationMap_.empty()); 315 } 316 317 void CAxis::setTransformations(const TransMapTypes& axisTrans) 318 { 319 transformationMap_ = axisTrans; 320 } 321 322 CAxis::TransMapTypes CAxis::getAllTransformations(void) 323 { 324 return transformationMap_; 325 } 326 327 /*! 328 Check the validity of all transformations applied on axis 329 This functions is called AFTER all inherited attributes are solved 330 */ 331 void CAxis::checkTransformations() 332 { 333 TransMapTypes::const_iterator itb = transformationMap_.begin(), it, 334 ite = transformationMap_.end(); 335 for (it = itb; it != ite; ++it) 336 { 337 (it->second)->checkValid(this); 338 } 324 339 } 325 340 … … 350 365 if (node.goToChildElement()) 351 366 { 352 StdString tranformation("transformation"); 367 StdString inverseAxisDefRoot("inverse_axis_definition"); 368 StdString inverse("inverse_axis"); 369 StdString zoomAxisDefRoot("zoom_axis_definition"); 370 StdString zoom("zoom_axis"); 353 371 do 354 372 { 355 if (node.getElementName() == tranformation) { 356 this->getVirtualTransformationGroup()->parseChild(node); 373 if (node.getElementName() == inverse) { 374 CInverseAxis* tmp = (CInverseAxisGroup::get(inverseAxisDefRoot))->createChild(); 375 tmp->parse(node); 376 transformationMap_[TRANS_INVERSE_AXIS] = tmp; 377 } else if (node.getElementName() == zoom) { 378 CZoomAxis* tmp = (CZoomAxisGroup::get(zoomAxisDefRoot))->createChild(); 379 tmp->parse(node); 380 transformationMap_[TRANS_ZOOM_AXIS] = tmp; 357 381 } 358 382 } while (node.goToNextElement()) ; 359 383 node.goToParentElement(); 360 384 } 361 setTransformations(this->getVirtualTransformationGroup()->getAllChildren());362 385 } 363 386
Note: See TracChangeset
for help on using the changeset viewer.