Changeset 347 for XIOS/trunk/src/node/file.cpp
- Timestamp:
- 05/21/12 17:57:22 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/node/file.cpp
r346 r347 45 45 } 46 46 47 boost::shared_ptr<CFieldGroup>CFile::getVirtualFieldGroup(void) const47 CFieldGroup* CFile::getVirtualFieldGroup(void) const 48 48 { 49 49 return (this->vFieldGroup); 50 50 } 51 51 52 std::vector< boost::shared_ptr<CField>> CFile::getAllFields(void) const52 std::vector<CField*> CFile::getAllFields(void) const 53 53 { 54 54 return (this->vFieldGroup->getAllChildren()); … … 57 57 //---------------------------------------------------------------- 58 58 59 std::vector<boost::shared_ptr<CField> > CFile::getEnabledFields 60 (int default_outputlevel, int default_level, bool default_enabled) 59 std::vector<CField*> CFile::getEnabledFields(int default_outputlevel, 60 int default_level, 61 bool default_enabled) 61 62 { 62 63 if (!this->enabledFields.empty()) … … 65 66 const int _outputlevel = 66 67 (!output_level.isEmpty()) ? output_level.getValue() : default_outputlevel; 67 std::vector< boost::shared_ptr<CField>>::iterator it;68 std::vector<CField*>::iterator it; 68 69 this->enabledFields = this->getAllFields(); 69 70 70 std::vector< boost::shared_ptr<CField>> newEnabledFields;71 std::vector<CField*> newEnabledFields; 71 72 72 73 for ( it = this->enabledFields.begin() ; it != this->enabledFields.end(); it++ ) … … 112 113 //---------------------------------------------------------------- 113 114 114 void CFile::setVirtualFieldGroup( boost::shared_ptr<CFieldGroup>newVFieldGroup)115 void CFile::setVirtualFieldGroup(CFieldGroup* newVFieldGroup) 115 116 { 116 117 this->vFieldGroup = newVFieldGroup; … … 127 128 bool CFile::isSyncTime(void) 128 129 { 129 shared_ptr<CContext>context = CContext::getCurrent() ;130 CContext* context = CContext::getCurrent() ; 130 131 CDate& currentDate=context->calendar->getCurrentDate() ; 131 132 if (! sync_freq.isEmpty()) … … 142 143 void CFile::initFile(void) 143 144 { 144 shared_ptr<CContext>context = CContext::getCurrent() ;145 CContext* context = CContext::getCurrent() ; 145 146 CDate& currentDate=context->calendar->getCurrentDate() ; 146 147 … … 163 164 bool CFile::checkSync(void) 164 165 { 165 shared_ptr<CContext>context = CContext::getCurrent() ;166 CContext* context = CContext::getCurrent() ; 166 167 CDate& currentDate=context->calendar->getCurrentDate() ; 167 168 if (! sync_freq.isEmpty()) … … 180 181 bool CFile::checkSplit(void) 181 182 { 182 shared_ptr<CContext>context = CContext::getCurrent() ;183 CContext* context = CContext::getCurrent() ; 183 184 CDate& currentDate=context->calendar->getCurrentDate() ; 184 185 if (! split_freq.isEmpty()) … … 188 189 *lastSplit=currentDate-outputFreq ; 189 190 190 std::vector< boost::shared_ptr<CField>>::iterator it, end = this->enabledFields.end();191 std::vector<CField*>::iterator it, end = this->enabledFields.end(); 191 192 for (it = this->enabledFields.begin() ;it != end; it++) (*it)->resetNStep() ; 192 193 createHeader() ; … … 199 200 void CFile::createHeader(void) 200 201 { 201 shared_ptr<CContext>context = CContext::getCurrent() ;202 CContext* context = CContext::getCurrent() ; 202 203 CDate& currentDate=context->calendar->getCurrentDate() ; 203 204 204 std::vector< boost::shared_ptr<CField>>::iterator it, end = this->enabledFields.end();205 std::vector<CField*>::iterator it, end = this->enabledFields.end(); 205 206 206 207 AllDomainEmpty=true ; … … 208 209 for (it = this->enabledFields.begin() ;it != end; it++) 209 210 { 210 boost::shared_ptr<CField>field = *it;211 CField* field = *it; 211 212 AllDomainEmpty&=field->grid->domain->isEmpty() ; 212 setDomain.insert(field->grid->domain .get()) ;213 setDomain.insert(field->grid->domain) ; 213 214 } 214 215 nbDomain=setDomain.size() ; … … 260 261 for (it = this->enabledFields.begin() ;it != end; it++) 261 262 { 262 boost::shared_ptr<CField>field = *it;263 CField* field = *it; 263 264 this->data_out->writeFieldGrid(field); 264 265 } … … 266 267 for (it = this->enabledFields.begin() ;it != end; it++) 267 268 { 268 boost::shared_ptr<CField>field = *it;269 CField* field = *it; 269 270 this->data_out->writeField(field); 270 271 } … … 306 307 oss << " id=\"" << this->getId() << "\" "; 307 308 oss << SuperClassAttribute::toString() << ">" << std::endl; 308 if (this->getVirtualFieldGroup() .get()!= NULL)309 if (this->getVirtualFieldGroup() != NULL) 309 310 oss << *this->getVirtualFieldGroup() << std::endl; 310 311 oss << "</" << CFile::GetName() << " >"; … … 325 326 { 326 327 // Résolution des héritages par référence de chacun des champs contenus dans le fichier. 327 std::vector< boost::shared_ptr<CField>> allF = this->getAllFields();328 std::vector<CField*> allF = this->getAllFields(); 328 329 for (unsigned int i = 0; i < allF.size(); i++) 329 330 allF[i]->solveRefInheritance(); … … 351 352 { 352 353 ENodeType genum = CFileGroup::GetType(); 353 bool hasVFG = (this->getVirtualFieldGroup() .get()!= NULL);354 bool hasVFG = (this->getVirtualFieldGroup() != NULL); 354 355 SuperClass::toBinary(os); 355 356 … … 381 382 } 382 383 383 shared_ptr<CField>CFile::addField(const string& id)384 CField* CFile::addField(const string& id) 384 385 { 385 386 return vFieldGroup->createChild(id) ; 386 387 } 387 388 388 shared_ptr<CFieldGroup>CFile::addFieldGroup(const string& id)389 CFieldGroup* CFile::addFieldGroup(const string& id) 389 390 { 390 391 return vFieldGroup->createChildGroup(id) ; … … 394 395 void CFile::sendAddField(const string& id) 395 396 { 396 shared_ptr<CContext>context=CContext::getCurrent() ;397 CContext* context=CContext::getCurrent() ; 397 398 398 399 if (! context->hasServer ) … … 416 417 void CFile::sendAddFieldGroup(const string& id) 417 418 { 418 shared_ptr<CContext>context=CContext::getCurrent() ;419 CContext* context=CContext::getCurrent() ; 419 420 if (! context->hasServer ) 420 421 {
Note: See TracChangeset
for help on using the changeset viewer.