Ignore:
Timestamp:
05/03/11 11:55:06 (13 years ago)
Author:
hozdoba
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • XMLIO_V2/dev/dev_rv/src/xmlio/node/field.cpp

    r182 r187  
    77#include "node_type.hpp" 
    88 
     9#include "xios_manager.hpp" 
     10 
    911namespace xmlioserver{ 
    1012namespace tree { 
     
    1416   CField::CField(void) 
    1517      : CObjectTemplate<CField>(), CFieldAttributes() 
    16       , baseRefObject(), refObject(), grid(), file(), foperation(NULL) 
     18      , refObject(), baseRefObject() 
     19      , grid(), file() 
     20      , freq_operation(), freq_write() 
     21      , foperation() 
     22      , data() 
    1723   { /* Ne rien faire de plus */ } 
    1824 
    1925   CField::CField(const StdString & id) 
    2026      : CObjectTemplate<CField>(id), CFieldAttributes() 
    21       , baseRefObject(), refObject(), foperation(NULL) 
     27      , refObject(), baseRefObject() 
     28      , grid(), file() 
     29      , freq_operation(), freq_write() 
     30      , foperation() 
     31      , data() 
    2232   { /* Ne rien faire de plus */ } 
    2333 
     
    2636      this->grid.reset() ; 
    2737      this->file.reset() ; 
    28       if (this->foperation == NULL) 
    29          delete this->foperation; 
     38      this->foperation.reset() ; 
     39      this->data.reset() ; 
    3040   } 
    3141 
     
    107117      boost::shared_ptr<CField> refer_sptr; 
    108118      CField * refer_ptr = this; 
     119       
    109120      this->baseRefObject = CObjectFactory::GetObject<CField>(this); 
     121       
    110122      while (refer_ptr->hasDirectFieldReference()) 
    111123      { 
     
    131143   void  CField::solveOperation(void) 
    132144   { 
    133       // TODO : à compléter; 
     145      using namespace func; 
     146      using namespace date; 
     147        
     148      StdString id = this->getBaseFieldReference()->getId();       
     149      if (operation.isEmpty() || freq_op.isEmpty() || this->file->output_freq.isEmpty()) 
     150      { 
     151         ERROR("CField::solveOperation(void)", 
     152               << "[ id = " << id << "]" 
     153               << "Impossible de définir une opération pour le champ !"); 
     154      } 
     155 
     156      if (CXIOSManager::GetStatus() == CXIOSManager::LOC_SERVER) 
     157      { 
     158         this->freq_operation = CDuration::FromString(this->file->output_freq.getValue()); 
     159         this->freq_write     = CDuration::FromString(this->file->output_freq.getValue()); 
     160         //this->foperation = boost::shared_ptr<func::CFunctor>(new CInstant()); 
     161      } 
     162      else 
     163      { 
     164         this->freq_operation = CDuration::FromString(freq_op.getValue()); 
     165         this->freq_write     = CDuration::FromString(this->file->output_freq.getValue()); 
     166          
     167#define DECLARE_FUNCTOR(MType, mtype) \ 
     168   if  (operation.getValue().compare(#mtype) == 0){} 
     169      //this->foperation = boost::shared_ptr<func::CFunctor>(new C##MType()); 
     170    
     171#include "functor_type.conf" 
     172      } 
    134173   } 
    135174    
Note: See TracChangeset for help on using the changeset viewer.