#ifndef __XMLIO_CObjectFactory__ #define __XMLIO_CObjectFactory__ /// boost headers /// #include /// xmlioserver headers /// #include "xmlioserver_spl.hpp" #include "exception.hpp" #include "object_template.hpp" namespace xmlioserver { /// ////////////////////// Déclarations ////////////////////// /// class CObjectFactory { public : /// Mutateurs /// static void SetCurrentContextId(const StdString & context); /// Accesseurs /// static StdString & GetCurrentContextId(void); template static inline boost::shared_ptr GetObject(const StdString & id); template static inline boost::shared_ptr GetObject(const StdString& context,const StdString & id); template static inline boost::shared_ptr GetObject(const U * const object); template static inline int GetObjectNum(void); template static inline int GetObjectIdNum(void); template static inline const std::vector > & GetObjectVector(const StdString & context = CObjectFactory::GetCurrentContextId()); /// Tests /// template static inline bool HasObject(const StdString & id); template static inline bool HasObject(const StdString& context,const StdString & id); /// Instanciateur /// template static inline boost::shared_ptr CreateObject(const StdString & id = StdString("")); template static inline StdString GenUId(void) ; private : /// Propriétés statiques /// static StdString CurrContext; }; // class CObjectFactory } // namespace xmlioserver #include "object_factory_impl.hpp" #endif // __XMLIO_CObjectFactory__