25 #ifndef __DOTS_OBJECT_FACTORY_H__ 
   26 #define __DOTS_OBJECT_FACTORY_H__ 
   28 #include <boost/noncopyable.hpp> 
   29 #include <boost/shared_ptr.hpp> 
   30 #include <boost/thread/once.hpp> 
   36 #pragma warning(disable: 4275) 
   49     typedef boost::shared_ptr<Object> 
ObjectPtr;
 
   59         : 
private boost::noncopyable
 
   92         typedef ObjectPtr (*CreateObjectCallback)(
char const * 
const blob);
 
  100         bool RegisterClass(
const TypeId typeId, CreateObjectCallback createFunction);
 
  124         ObjectPtr CreateObject(
char const * 
const blob) 
const;
 
  133 #pragma warning (push) 
  134 #pragma warning (disable: 4251) // warning C4251: 'Safir::Dob::Typesystem::ObjectFactory::m_CallbackMap' : class 'stdext::hash_map<_Kty,_Ty>' needs to have dll-interface to be used by clients of class 'Safir::Dob::Typesystem::ObjectFactory' 
  137         typedef unordered_map<TypeId,CreateObjectCallback> CallbackMap;
 
  138         CallbackMap m_CallbackMap;
 
  141 #pragma warning (pop) 
  150         struct SingletonHelper
 
  156             static boost::once_flag m_onceFlag;
 
DotsC_TypeId TypeId
A unique type identifier. 
Definition: Dob/Typesystem/Defs.h:221
boost::shared_ptr< Object > ObjectPtr
A smart pointer to an Object. 
Definition: Object.h:41
This class is an object factory for all automatically generated DOB classes. 
Definition: ObjectFactory.h:58
static ObjectFactory & Instance()
Get the instance of the singleton.