Ignore:
Timestamp:
06/19/13 10:09:36 (11 years ago)
Author:
ymipsl
Message:

Add possibility to make inheritance of attributes and reference before closing the context definition.
New fortran fonction : xios_solve inheritance()
After this call, the value of attribute have the inherited value of their parent.

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/file.cpp

    r431 r445  
    358358   //---------------------------------------------------------------- 
    359359    
    360    void CFile::solveDescInheritance(const CAttributeMap * const parent) 
    361    { 
    362       SuperClassAttribute::setAttributes(parent); 
    363       this->getVirtualFieldGroup()->solveDescInheritance(NULL); 
    364    } 
    365  
    366    //---------------------------------------------------------------- 
    367  
    368    void CFile::solveFieldRefInheritance(void) 
     360   void CFile::solveDescInheritance(bool apply, const CAttributeMap * const parent) 
     361   { 
     362      SuperClassAttribute::setAttributes(parent,apply); 
     363      this->getVirtualFieldGroup()->solveDescInheritance(apply, NULL); 
     364   } 
     365 
     366   //---------------------------------------------------------------- 
     367 
     368   void CFile::solveFieldRefInheritance(bool apply) 
    369369   { 
    370370      // Résolution des héritages par référence de chacun des champs contenus dans le fichier. 
    371371      std::vector<CField*> allF = this->getAllFields(); 
    372372      for (unsigned int i = 0; i < allF.size(); i++) 
    373          allF[i]->solveRefInheritance(); 
     373         allF[i]->solveRefInheritance(apply); 
    374374   } 
    375375 
Note: See TracChangeset for help on using the changeset viewer.