Ignore:
Timestamp:
11/15/17 12:14:34 (6 years ago)
Author:
yushan
Message:

dev_omp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_openmp/src/object_template_impl.hpp

    r1287 r1328  
    2424      xios_map<StdString, 
    2525      xios_map<StdString, 
    26       boost::shared_ptr<T> > > *CObjectTemplate<T>::AllMapObj = 0; 
     26      //boost::shared_ptr<T> > > CObjectTemplate<T>::AllMapObj; 
     27      boost::shared_ptr<T> > > *CObjectTemplate<T>::AllMapObj_ptr = 0; 
    2728 
    2829   template <class T> 
    2930      xios_map<StdString, 
    30       std::vector<boost::shared_ptr<T> > > *CObjectTemplate<T>::AllVectObj = 0; 
    31  
    32    template <class T> 
    33       xios_map<StdString,long int> *CObjectTemplate<T>::GenId = 0; 
     31      //std::vector<boost::shared_ptr<T> > > CObjectTemplate<T>::AllVectObj; 
     32      std::vector<boost::shared_ptr<T> > > *CObjectTemplate<T>::AllVectObj_ptr = 0; 
     33 
     34   template <class T> 
     35      //xios_map<StdString,long int> CObjectTemplate<T>::GenId; 
     36      xios_map<StdString,long int> *CObjectTemplate<T>::GenId_ptr = 0; 
    3437 
    3538   template <class T> 
     
    6669         CObjectTemplate<T>::GetAllVectobject(const StdString & contextId) 
    6770   { 
    68       return (CObjectTemplate<T>::AllVectObj->at(contextId)); 
     71      //return (CObjectTemplate<T>::AllVectObj[contextId]); 
     72    return (CObjectTemplate<T>::AllVectObj_ptr->at(contextId)); 
    6973   } 
    7074 
     
    321325 
    322326   template <typename T> 
    323    boost::shared_ptr<T> CObjectTemplate<T>::getShared(const T* ptr) 
     327   shared_ptr<T> CObjectTemplate<T>::getShared(const T* ptr) 
    324328   { 
    325329     return CObjectFactory::GetObject<T>(ptr); 
     
    327331 
    328332   template <typename T> 
    329    boost::shared_ptr<T> CObjectTemplate<T>::getShared(void) 
     333   shared_ptr<T> CObjectTemplate<T>::getShared(void) 
    330334   { 
    331335     return CObjectFactory::GetObject<T>((T*)this); 
     
    335339   const vector<T*> CObjectTemplate<T>::getAll() 
    336340   { 
    337      const vector< boost::shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>(); 
     341     const vector< shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>(); 
    338342     vector<T*> vect; 
    339343 
    340      typename vector<boost::shared_ptr<T> >::const_iterator it; 
     344     typename vector<shared_ptr<T> >::const_iterator it; 
    341345     for(it=shared_vect.begin();it!=shared_vect.end();++it) vect.push_back(it->get()); 
    342346     return vect; 
     
    346350   const vector<T*> CObjectTemplate<T>::getAll(const string & id) 
    347351   { 
    348      const vector< boost::shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>(id); 
     352     const vector< shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>(id); 
    349353     vector<T*> vect; 
    350354 
    351      typename vector<boost::shared_ptr<T> >::const_iterator it; 
     355     typename vector<shared_ptr<T> >::const_iterator it; 
    352356     for(it=shared_vect.begin();it!=shared_vect.end();++it) vect.push_back(it->get()); 
    353357     return vect; 
Note: See TracChangeset for help on using the changeset viewer.