Ignore:
Timestamp:
06/13/18 16:48:53 (6 years ago)
Author:
oabramkina
Message:

Replacing Boost's unordered_map and shared_pointer by its STL counterparts.

Two notes for Curie:

  • one can see the content of unordered_map with ddt only if XIOS has been compiled with gnu
  • XIOS will not compile any more with pgi (all available versions use old STL which are not up to the c++11 norms)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/object_template_impl.hpp

    r1330 r1542  
    2424      xios_map<StdString, 
    2525      xios_map<StdString, 
    26       boost::shared_ptr<T> > > CObjectTemplate<T>::AllMapObj; 
     26      std::shared_ptr<T> > > CObjectTemplate<T>::AllMapObj; 
    2727 
    2828   template <class T> 
    2929      xios_map<StdString, 
    30       std::vector<boost::shared_ptr<T> > > CObjectTemplate<T>::AllVectObj; 
     30      std::vector<std::shared_ptr<T> > > CObjectTemplate<T>::AllVectObj; 
    3131 
    3232   template <class T> 
     
    6363 
    6464   template <class T> 
    65       std::vector<boost::shared_ptr<T> > & 
     65      std::vector<std::shared_ptr<T> > & 
    6666         CObjectTemplate<T>::GetAllVectobject(const StdString & contextId) 
    6767   { 
     
    412412 
    413413   template <typename T> 
    414    shared_ptr<T> CObjectTemplate<T>::getShared(const T* ptr) 
     414   std::shared_ptr<T> CObjectTemplate<T>::getShared(const T* ptr) 
    415415   { 
    416416     return CObjectFactory::GetObject<T>(ptr); 
     
    418418 
    419419   template <typename T> 
    420    shared_ptr<T> CObjectTemplate<T>::getShared(void) 
     420   std::shared_ptr<T> CObjectTemplate<T>::getShared(void) 
    421421   { 
    422422     return CObjectFactory::GetObject<T>((T*)this); 
     
    426426   const vector<T*> CObjectTemplate<T>::getAll() 
    427427   { 
    428      const vector< shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>(); 
     428     const vector< std::shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>(); 
    429429     vector<T*> vect; 
    430430 
    431      typename vector<shared_ptr<T> >::const_iterator it; 
     431     typename vector<std::shared_ptr<T> >::const_iterator it; 
    432432     for(it=shared_vect.begin();it!=shared_vect.end();++it) vect.push_back(it->get()); 
    433433     return vect; 
     
    437437   const vector<T*> CObjectTemplate<T>::getAll(const string & id) 
    438438   { 
    439      const vector< shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>(id); 
     439     const vector< std::shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>(id); 
    440440     vector<T*> vect; 
    441441 
    442      typename vector<shared_ptr<T> >::const_iterator it; 
     442     typename vector<std::shared_ptr<T> >::const_iterator it; 
    443443     for(it=shared_vect.begin();it!=shared_vect.end();++it) vect.push_back(it->get()); 
    444444     return vect; 
     
    475475     oss << iendl; 
    476476     oss << "#include <boost/multi_array.hpp>" << iendl; 
    477      oss << "#include <boost/shared_ptr.hpp>" << iendl; 
     477     oss << "#include <boostXXX/shared_ptr.hpp>" << iendl; 
    478478     oss << "#include \"xios.hpp\"" << iendl; 
    479479     oss << "#include \"attribute_template.hpp\"" << iendl; 
Note: See TracChangeset for help on using the changeset viewer.