Changeset 1331 for XIOS/dev/branch_openmp/src/object_factory.hpp
- Timestamp:
- 11/16/17 16:20:41 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_openmp/src/object_factory.hpp
r1328 r1331 12 12 namespace xios 13 13 { 14 15 16 17 14 /// ////////////////////// Déclarations ////////////////////// /// 15 class CObjectFactory 16 { 17 public : 18 18 19 20 19 /// Mutateurs /// 20 static void SetCurrentContextId(const StdString & context); 21 21 22 23 22 /// Accesseurs /// 23 static StdString & GetCurrentContextId(void); 24 24 25 26 25 template <typename U> 26 static boost::shared_ptr<U> GetObject(const StdString & id); 27 27 28 29 28 template <typename U> 29 static boost::shared_ptr<U> GetObject(const StdString& context,const StdString & id); 30 30 31 32 31 template <typename U> 32 static boost::shared_ptr<U> GetObject(const U * const object); 33 33 34 35 36 37 34 template <typename U> 35 static int GetObjectNum(void); 36 template <typename U> 37 static int GetObjectIdNum(void); 38 38 39 40 41 39 template <typename U> 40 static const std::vector<boost::shared_ptr<U> > & 41 GetObjectVector(const StdString & context = CObjectFactory::GetCurrentContextId()); 42 42 43 44 45 43 /// Tests /// 44 template <typename U> 45 static bool HasObject(const StdString & id); 46 46 47 48 47 template <typename U> 48 static bool HasObject(const StdString& context,const StdString & id); 49 49 50 51 52 50 /// Instanciateur /// 51 template <typename U> 52 static boost::shared_ptr<U> CreateObject(const StdString & id = StdString("")); 53 53 54 55 56 54 template <typename U> static const StdString& GetUIdBase(void); 55 template <typename U> static StdString GenUId(void); 56 template <typename U> static bool IsGenUId(const StdString& id); 57 57 58 58 private : 59 59 60 /// Propriétés statiques /// 61 static StdString CurrContext; 60 /// Propriétés statiques /// 61 static StdString CurrContext; 62 // #pragma omp threadprivate(CurrContext) 62 63 63 64 }; // class CObjectFactory 64 65 } // namespace xios 65 66
Note: See TracChangeset
for help on using the changeset viewer.