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