Changeset 346 for XIOS/trunk/src/node/field.cpp
- Timestamp:
- 04/12/12 17:02:23 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/node/field.cpp
r345 r346 94 94 void CField::sendUpdateData(void) 95 95 { 96 shared_ptr<CContext> context =CObjectFactory::GetObject<CContext>(CObjectFactory::GetCurrentContextId()) ;96 shared_ptr<CContext> context = CContext::getCurrent() ; 97 97 CContextClient* client=context->client ; 98 98 … … 150 150 } 151 151 152 shared_ptr<CContext> context =CObjectFactory::GetObject<CContext>(CObjectFactory::GetCurrentContextId()) ;152 shared_ptr<CContext> context = CContext::getCurrent() ; 153 153 const CDate & currDate = context->getCalendar()->getCurrentDate(); 154 154 const CDate opeDate = *last_operation_srv + freq_operation_srv; … … 187 187 getRelFile()->checkFile(); 188 188 this->incrementNStep(); 189 getRelFile()->getDataOutput()->writeFieldData(C ObjectFactory::GetObject<CField>(this));189 getRelFile()->getDataOutput()->writeFieldData(CField::get(this)); 190 190 } 191 191 } … … 239 239 return (this->getBaseFieldReference()); 240 240 241 if (! C ObjectFactory::HasObject<CField>(this->field_ref.getValue()))241 if (! CField::has(this->field_ref.getValue())) 242 242 ERROR("CField::getDirectFieldReference(void)", 243 243 << "[ ref_name = " << this->field_ref.getValue() << "]" 244 244 << " invalid field name !"); 245 245 246 return (C ObjectFactory::GetObject<CField>(this->field_ref.getValue()));246 return (CField::get(this->field_ref.getValue())); 247 247 } 248 248 … … 328 328 CField * refer_ptr = this; 329 329 330 this->baseRefObject = C ObjectFactory::GetObject<CField>(this);330 this->baseRefObject = CField::get(this); 331 331 332 332 while (refer_ptr->hasDirectFieldReference()) … … 356 356 357 357 StdString id = this->getBaseFieldReference()->getId(); 358 boost::shared_ptr<CContext> context = 359 CObjectFactory::GetObject<CContext>(CObjectFactory::GetCurrentContextId()); 358 boost::shared_ptr<CContext> context = CContext::getCurrent(); 360 359 361 360 if (operation.isEmpty() || freq_op.isEmpty() || this->file->output_freq.isEmpty()) … … 448 447 if (!domain_ref.isEmpty()) 449 448 { 450 if (C ObjectFactory::HasObject<CDomain>(domain_ref.getValue()))451 domain = C ObjectFactory::GetObject<CDomain>(domain_ref.getValue()) ;449 if (CDomain::has(domain_ref.getValue())) 450 domain = CDomain::get(domain_ref.getValue()) ; 452 451 else 453 452 ERROR("CField::solveGridReference(void)", … … 458 457 if (!axis_ref.isEmpty()) 459 458 { 460 if (C ObjectFactory::HasObject<CAxis>(axis_ref.getValue()))461 axis = C ObjectFactory::GetObject<CAxis>(axis_ref.getValue()) ;459 if (CAxis::has(axis_ref.getValue())) 460 axis = CAxis::get(axis_ref.getValue()) ; 462 461 else 463 462 ERROR("CField::solveGridReference(void)", … … 468 467 if (!grid_ref.isEmpty()) 469 468 { 470 if (C ObjectFactory::HasObject<CGrid>(grid_ref.getValue()))471 this->grid = C ObjectFactory::GetObject<CGrid>(grid_ref.getValue()) ;469 if (CGrid::has(grid_ref.getValue())) 470 this->grid = CGrid::get(grid_ref.getValue()) ; 472 471 else 473 472 ERROR("CField::solveGridReference(void)", … … 514 513 StdString gref = this->group_ref.getValue(); 515 514 516 if (!C ObjectFactory::HasObject<CFieldGroup>(gref))515 if (!CFieldGroup::has(gref)) 517 516 ERROR("CGroupTemplate<CField, CFieldGroup, CFieldAttributes>::solveRefInheritance(void)", 518 517 << "[ gref = " << gref << "]" 519 518 << " invalid group name !"); 520 519 521 boost::shared_ptr<CFieldGroup> group 522 = CObjectFactory::GetObject<CFieldGroup>(gref); 523 boost::shared_ptr<CFieldGroup> owner 524 = CObjectFactory::GetObject<CFieldGroup> 525 (boost::polymorphic_downcast<CFieldGroup*>(this)); 520 boost::shared_ptr<CFieldGroup> group = CFieldGroup::get(gref); 521 boost::shared_ptr<CFieldGroup> owner = CFieldGroup::get(boost::polymorphic_downcast<CFieldGroup*>(this)); 526 522 527 523 std::vector<boost::shared_ptr<CField> > allChildren = group->getAllChildren(); … … 532 528 { 533 529 boost::shared_ptr<CField> child = *it; 534 if (child->hasId()) 535 CGroupFactory::CreateChild(owner)->field_ref.setValue(child->getId());530 if (child->hasId()) owner->createChild()->field_ref.setValue(child->getId()) ; 531 536 532 } 537 533 }
Note: See TracChangeset
for help on using the changeset viewer.