Changeset 1328 for XIOS/dev/branch_openmp/src/object_template_impl.hpp
- Timestamp:
- 11/15/17 12:14:34 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_openmp/src/object_template_impl.hpp
r1287 r1328 24 24 xios_map<StdString, 25 25 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; 27 28 28 29 template <class T> 29 30 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; 34 37 35 38 template <class T> … … 66 69 CObjectTemplate<T>::GetAllVectobject(const StdString & contextId) 67 70 { 68 return (CObjectTemplate<T>::AllVectObj->at(contextId)); 71 //return (CObjectTemplate<T>::AllVectObj[contextId]); 72 return (CObjectTemplate<T>::AllVectObj_ptr->at(contextId)); 69 73 } 70 74 … … 321 325 322 326 template <typename T> 323 boost::shared_ptr<T> CObjectTemplate<T>::getShared(const T* ptr)327 shared_ptr<T> CObjectTemplate<T>::getShared(const T* ptr) 324 328 { 325 329 return CObjectFactory::GetObject<T>(ptr); … … 327 331 328 332 template <typename T> 329 boost::shared_ptr<T> CObjectTemplate<T>::getShared(void)333 shared_ptr<T> CObjectTemplate<T>::getShared(void) 330 334 { 331 335 return CObjectFactory::GetObject<T>((T*)this); … … 335 339 const vector<T*> CObjectTemplate<T>::getAll() 336 340 { 337 const vector< boost::shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>();341 const vector< shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>(); 338 342 vector<T*> vect; 339 343 340 typename vector< boost::shared_ptr<T> >::const_iterator it;344 typename vector<shared_ptr<T> >::const_iterator it; 341 345 for(it=shared_vect.begin();it!=shared_vect.end();++it) vect.push_back(it->get()); 342 346 return vect; … … 346 350 const vector<T*> CObjectTemplate<T>::getAll(const string & id) 347 351 { 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); 349 353 vector<T*> vect; 350 354 351 typename vector< boost::shared_ptr<T> >::const_iterator it;355 typename vector<shared_ptr<T> >::const_iterator it; 352 356 for(it=shared_vect.begin();it!=shared_vect.end();++it) vect.push_back(it->get()); 353 357 return vect;
Note: See TracChangeset
for help on using the changeset viewer.