Ignore:
Timestamp:
04/12/12 17:02:23 (12 years ago)
Author:
ymipsl
Message:

Suppress access to CObjectFactory class and CTreeManager.

YM

File:
1 edited

Legend:

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

    r345 r346  
    9494  void CField::sendUpdateData(void) 
    9595  { 
    96     shared_ptr<CContext> context=CObjectFactory::GetObject<CContext>(CObjectFactory::GetCurrentContextId()) ; 
     96    shared_ptr<CContext> context = CContext::getCurrent() ; 
    9797    CContextClient* client=context->client ; 
    9898     
     
    150150    } 
    151151 
    152     shared_ptr<CContext> context=CObjectFactory::GetObject<CContext>(CObjectFactory::GetCurrentContextId()) ; 
     152    shared_ptr<CContext> context = CContext::getCurrent() ; 
    153153    const CDate & currDate = context->getCalendar()->getCurrentDate(); 
    154154    const CDate opeDate      = *last_operation_srv + freq_operation_srv; 
     
    187187      getRelFile()->checkFile(); 
    188188      this->incrementNStep(); 
    189       getRelFile()->getDataOutput()->writeFieldData(CObjectFactory::GetObject<CField>(this)); 
     189      getRelFile()->getDataOutput()->writeFieldData(CField::get(this)); 
    190190    } 
    191191  } 
     
    239239         return (this->getBaseFieldReference()); 
    240240 
    241       if (! CObjectFactory::HasObject<CField>(this->field_ref.getValue())) 
     241      if (! CField::has(this->field_ref.getValue())) 
    242242         ERROR("CField::getDirectFieldReference(void)", 
    243243               << "[ ref_name = " << this->field_ref.getValue() << "]" 
    244244               << " invalid field name !"); 
    245245 
    246       return (CObjectFactory::GetObject<CField>(this->field_ref.getValue())); 
     246      return (CField::get(this->field_ref.getValue())); 
    247247   } 
    248248 
     
    328328      CField * refer_ptr = this; 
    329329       
    330       this->baseRefObject = CObjectFactory::GetObject<CField>(this); 
     330      this->baseRefObject = CField::get(this); 
    331331       
    332332      while (refer_ptr->hasDirectFieldReference()) 
     
    356356        
    357357      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(); 
    360359 
    361360      if (operation.isEmpty() || freq_op.isEmpty() || this->file->output_freq.isEmpty()) 
     
    448447      if (!domain_ref.isEmpty()) 
    449448      { 
    450          if (CObjectFactory::HasObject<CDomain>(domain_ref.getValue())) 
    451             domain = CObjectFactory::GetObject<CDomain>(domain_ref.getValue()) ; 
     449         if (CDomain::has(domain_ref.getValue())) 
     450            domain = CDomain::get(domain_ref.getValue()) ; 
    452451         else 
    453452            ERROR("CField::solveGridReference(void)", 
     
    458457      if (!axis_ref.isEmpty()) 
    459458      { 
    460          if (CObjectFactory::HasObject<CAxis>(axis_ref.getValue())) 
    461             axis = CObjectFactory::GetObject<CAxis>(axis_ref.getValue()) ; 
     459         if (CAxis::has(axis_ref.getValue())) 
     460            axis = CAxis::get(axis_ref.getValue()) ; 
    462461         else 
    463462            ERROR("CField::solveGridReference(void)", 
     
    468467      if (!grid_ref.isEmpty()) 
    469468      { 
    470          if (CObjectFactory::HasObject<CGrid>(grid_ref.getValue())) 
    471             this->grid = CObjectFactory::GetObject<CGrid>(grid_ref.getValue()) ; 
     469         if (CGrid::has(grid_ref.getValue())) 
     470            this->grid = CGrid::get(grid_ref.getValue()) ; 
    472471         else 
    473472            ERROR("CField::solveGridReference(void)", 
     
    514513      StdString gref = this->group_ref.getValue(); 
    515514 
    516       if (!CObjectFactory::HasObject<CFieldGroup>(gref)) 
     515      if (!CFieldGroup::has(gref)) 
    517516         ERROR("CGroupTemplate<CField, CFieldGroup, CFieldAttributes>::solveRefInheritance(void)", 
    518517               << "[ gref = " << gref << "]" 
    519518               << " invalid group name !"); 
    520519 
    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)); 
    526522 
    527523      std::vector<boost::shared_ptr<CField> > allChildren  = group->getAllChildren(); 
     
    532528      { 
    533529         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             
    536532      } 
    537533   } 
Note: See TracChangeset for help on using the changeset viewer.