XIOS  1.0
Xml I/O Server
 Tout Classes Espaces de nommage Fichiers Fonctions Variables Définitions de type Énumérations Valeurs énumérées Amis Macros
object_factory.hpp
Aller à la documentation de ce fichier.
1 #ifndef __XIOS_CObjectFactory__
2 #define __XIOS_CObjectFactory__
3 
4 #include <memory>
5 
7 #include "xios_spl.hpp"
8 #include "exception.hpp"
9 #include "object_template.hpp"
10 
11 namespace xios
12 {
15  {
16  public :
17 
19  static void SetCurrentContextId(const StdString & context);
20 
22  static StdString & GetCurrentContextId(void);
23 
24  template <typename U>
25  static std::shared_ptr<U> GetObject(const StdString & id);
26 
27  template <typename U>
28  static std::shared_ptr<U> GetObject(const StdString& context,const StdString & id);
29 
30  template <typename U>
31  static std::shared_ptr<U> GetObject(const U * const object);
32 
33  template <typename U>
34  static int GetObjectNum(void);
35  template <typename U>
36  static int GetObjectIdNum(void);
37 
38  template <typename U>
39  static const std::vector<std::shared_ptr<U> > &
41 
43  template <typename U>
44  static bool HasObject(const StdString & id);
45 
46  template <typename U>
47  static bool HasObject(const StdString& context,const StdString & id);
48 
50  template <typename U>
51  static std::shared_ptr<U> CreateObject(const StdString & id = StdString(""));
52 
53  template <typename U> static const StdString& GetUIdBase(void);
54  template <typename U> static StdString GenUId(void);
55  template <typename U> static bool IsGenUId(const StdString& id);
56 
57  private :
58 
61 
62  }; // class CObjectFactory
63 } // namespace xios
64 
65 //#include "object_factory_impl.hpp"
66 
67 #endif // __XIOS_CObjectFactory__
static std::shared_ptr< U > CreateObject(const StdString &id=StdString(""))
Instanciateur ///.
static void SetCurrentContextId(const StdString &context)
Mutateurs ///.
static int GetObjectNum(void)
////////////////////// Définitions ////////////////////// ///
static int GetObjectIdNum(void)
std::string StdString
Definition: xios_spl.hpp:48
#define xios(arg)
static bool IsGenUId(const StdString &id)
static bool HasObject(const StdString &id)
Tests ///.
static StdString GenUId(void)
static const std::vector< std::shared_ptr< U > > & GetObjectVector(const StdString &context=CObjectFactory::GetCurrentContextId())
////////////////////// Déclarations ////////////////////// ///
static StdString CurrContext
Propriétés statiques ///.
static std::shared_ptr< U > GetObject(const StdString &id)
static const StdString & GetUIdBase(void)
static StdString & GetCurrentContextId(void)
Accesseurs ///.