Ignore:
Timestamp:
01/16/14 14:28:23 (10 years ago)
Author:
ymipsl
Message:

Add new parsing expression functionnalities
(modified files)

YM

File:
1 edited

Legend:

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

    r451 r459  
    102102         newEnabledFields.push_back(*it) ; 
    103103         // Le champ est finalement actif, on y ajoute sa propre reference. 
    104          (*it)->refObject.push_back(*it); 
     104//         (*it)->refObject.push_back(*it); 
    105105         // Le champ est finalement actif, on y ajoute la référence au champ de base. 
    106106         (*it)->setRelFile(CFile::get(this)); 
    107          (*it)->baseRefObject->refObject.push_back(*it); 
     107//         (*it)->baseRefObject->refObject.push_back(*it); 
    108108         // A faire, ajouter les references intermediaires... 
    109109      } 
     
    366366   //---------------------------------------------------------------- 
    367367 
     368   void CFile::processEnabledFile(void) 
     369   { 
     370     if (output_freq.isEmpty()) ERROR("void CFile::processEnabledFile(void)", 
     371                                       <<"File attribute <<output_freq>> is undefined");  
     372     solveFieldRefInheritance(true) ; 
     373     getEnabledFields() ; 
     374     processEnabledFields() ; 
     375   } 
     376    
     377   void CFile::processEnabledFields(void) 
     378   { 
     379      for (unsigned int i = 0; i < this->enabledFields.size(); i++) 
     380      { 
     381        this->enabledFields[i]->processEnabledField() ; 
     382      } 
     383    } 
     384     
    368385   void CFile::solveFieldRefInheritance(bool apply) 
    369386   { 
     
    389406         this->enabledFields[i]->solveOperation(); 
    390407   } 
    391     
    392    //--------------------------------------------------------------- 
    393 /* 
    394    void CFile::toBinary  (StdOStream & os) const 
    395    { 
    396       ENodeType genum = CFileGroup::GetType(); 
    397       bool hasVFG = (this->getVirtualFieldGroup() != NULL); 
    398       SuperClass::toBinary(os); 
    399        
    400       os.write (reinterpret_cast<const char*>(&genum) , sizeof(ENodeType)); 
    401       os.write (reinterpret_cast<const char*>(&hasVFG) , sizeof(bool)); 
    402        
    403       if (hasVFG)this->getVirtualFieldGroup()->toBinary(os); 
    404           
    405    } 
    406     
    407    //---------------------------------------------------------------- 
    408     
    409    void CFile::fromBinary(StdIStream & is) 
    410    { 
    411       ENodeType renum = Unknown; 
    412       bool hasVFG = false; 
    413       SuperClass::fromBinary(is); 
    414        
    415       is.read (reinterpret_cast<char*>(&renum), sizeof(ENodeType)); 
    416       is.read (reinterpret_cast<char*>(&hasVFG), sizeof(bool)); 
    417        
    418       if (renum != CFileGroup::GetType()) 
    419          ERROR("CFile::fromBinary(StdIStream & is)", 
    420                << "[ renum = " << renum << "] Bad type !"); 
    421        
    422 //      this->setVirtualFieldGroup(this->getId()); 
    423       if (hasVFG)this->getVirtualFieldGroup()->fromBinary(is); 
    424        
    425    } 
    426 */ 
     408  
     409   void CFile::solveEFExpression(void) 
     410   { 
     411      for (unsigned int i = 0; i < this->enabledFields.size(); i++) 
     412         this->enabledFields[i]->buildExpression(); 
     413   }    
     414  
    427415 
    428416   CField* CFile::addField(const string& id) 
Note: See TracChangeset for help on using the changeset viewer.