Changeset 187 for XMLIO_V2/dev/dev_rv/src/xmlio/node/field.cpp
- Timestamp:
- 05/03/11 11:55:06 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XMLIO_V2/dev/dev_rv/src/xmlio/node/field.cpp
r182 r187 7 7 #include "node_type.hpp" 8 8 9 #include "xios_manager.hpp" 10 9 11 namespace xmlioserver{ 10 12 namespace tree { … … 14 16 CField::CField(void) 15 17 : 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() 17 23 { /* Ne rien faire de plus */ } 18 24 19 25 CField::CField(const StdString & id) 20 26 : CObjectTemplate<CField>(id), CFieldAttributes() 21 , baseRefObject(), refObject(), foperation(NULL) 27 , refObject(), baseRefObject() 28 , grid(), file() 29 , freq_operation(), freq_write() 30 , foperation() 31 , data() 22 32 { /* Ne rien faire de plus */ } 23 33 … … 26 36 this->grid.reset() ; 27 37 this->file.reset() ; 28 if (this->foperation == NULL)29 delete this->foperation;38 this->foperation.reset() ; 39 this->data.reset() ; 30 40 } 31 41 … … 107 117 boost::shared_ptr<CField> refer_sptr; 108 118 CField * refer_ptr = this; 119 109 120 this->baseRefObject = CObjectFactory::GetObject<CField>(this); 121 110 122 while (refer_ptr->hasDirectFieldReference()) 111 123 { … … 131 143 void CField::solveOperation(void) 132 144 { 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 } 134 173 } 135 174
Note: See TracChangeset
for help on using the changeset viewer.