Changeset 1542 for XIOS/trunk/src/object_factory_impl.hpp
- Timestamp:
- 06/13/18 16:48:53 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/object_factory_impl.hpp
r769 r1542 43 43 44 44 template <typename U> 45 boost::shared_ptr<U> CObjectFactory::GetObject(const U * const object)45 std::shared_ptr<U> CObjectFactory::GetObject(const U * const object) 46 46 { 47 47 if (CurrContext.size() == 0) 48 48 ERROR("CObjectFactory::GetObject(const U * const object)", 49 49 << "please define current context id !"); 50 std::vector< boost::shared_ptr<U> > & vect =50 std::vector<std::shared_ptr<U> > & vect = 51 51 U::AllVectObj[CObjectFactory::CurrContext]; 52 52 53 typename std::vector< boost::shared_ptr<U> >::const_iterator53 typename std::vector<std::shared_ptr<U> >::const_iterator 54 54 it = vect.begin(), end = vect.end(); 55 55 56 56 for (; it != end; it++) 57 57 { 58 boost::shared_ptr<U> ptr = *it;58 std::shared_ptr<U> ptr = *it; 59 59 if (ptr.get() == object) 60 60 return (ptr); … … 64 64 << "[type = " << U::GetName() << ", adress = " << object << "] " 65 65 << "object was not found."); 66 return ( boost::shared_ptr<U>()); // jamais atteint66 return (std::shared_ptr<U>()); // jamais atteint 67 67 } 68 68 69 69 template <typename U> 70 boost::shared_ptr<U> CObjectFactory::GetObject(const StdString & id)70 std::shared_ptr<U> CObjectFactory::GetObject(const StdString & id) 71 71 { 72 72 if (CurrContext.size() == 0) … … 81 81 82 82 template <typename U> 83 boost::shared_ptr<U> CObjectFactory::GetObject(const StdString & context, const StdString & id)83 std::shared_ptr<U> CObjectFactory::GetObject(const StdString & context, const StdString & id) 84 84 { 85 85 if (!CObjectFactory::HasObject<U>(context,id)) … … 91 91 92 92 template <typename U> 93 boost::shared_ptr<U> CObjectFactory::CreateObject(const StdString& id)93 std::shared_ptr<U> CObjectFactory::CreateObject(const StdString& id) 94 94 { 95 95 if (CurrContext.empty()) … … 103 103 else 104 104 { 105 boost::shared_ptr<U> value(new U(id.empty() ? CObjectFactory::GenUId<U>() : id));105 std::shared_ptr<U> value(new U(id.empty() ? CObjectFactory::GenUId<U>() : id)); 106 106 107 107 U::AllVectObj[CObjectFactory::CurrContext].insert(U::AllVectObj[CObjectFactory::CurrContext].end(), value); … … 113 113 114 114 template <typename U> 115 const std::vector< boost::shared_ptr<U> > &115 const std::vector<std::shared_ptr<U> > & 116 116 CObjectFactory::GetObjectVector(const StdString & context) 117 117 {
Note: See TracChangeset
for help on using the changeset viewer.