#ifndef __XIOS_CObjectFactory__ #define __XIOS_CObjectFactory__ #include /// XIOS headers /// #include "xios_spl.hpp" #include "exception.hpp" #include "object_template.hpp" namespace xios { /// ////////////////////// Déclarations ////////////////////// /// class CObjectFactory { public : /// Mutateurs /// static void SetCurrentContextId(const StdString & context); /// Accesseurs /// static StdString & GetCurrentContextId(void); template static std::shared_ptr GetObject(const StdString & id); template static std::shared_ptr GetObject(const StdString& context,const StdString & id); template static std::shared_ptr GetObject(const U * const object); template static int GetObjectNum(void); template static int GetObjectIdNum(void); template static const std::vector > & GetObjectVector(const StdString & context = CObjectFactory::GetCurrentContextId()); /// Tests /// template static bool HasObject(const StdString & id); template static bool HasObject(const StdString& context,const StdString & id); /// Instanciateur /// template static std::shared_ptr CreateObject(const StdString & id = StdString("")); template static const StdString& GetUIdBase(void); template static StdString GenUId(void); template static bool IsGenUId(const StdString& id); private : /// Propriétés statiques /// static StdString *CurrContext_ptr; #pragma omp threadprivate(CurrContext_ptr) }; // class CObjectFactory } // namespace xios //#include "object_factory_impl.hpp" #endif // __XIOS_CObjectFactory__