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/unordered_map.hpp>
31 #include <boost/thread/once.hpp>
37 #pragma warning(disable: 4275)
50 typedef boost::shared_ptr<Object>
ObjectPtr;
60 :
private boost::noncopyable
80 ObjectPtr CreateObject(
const TypeId typeId)
const;
101 bool RegisterClass(
const TypeId typeId, CreateObjectCallback createFunction);
125 ObjectPtr CreateObject(
char const *
const blob)
const;
134 #pragma warning (push)
135 #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'
138 typedef boost::unordered_map<TypeId,CreateObjectCallback> CallbackMap;
139 CallbackMap m_CallbackMap;
142 #pragma warning (pop)
151 struct SingletonHelper
157 static boost::once_flag m_onceFlag;
DotsC_Int64 Int64
64 bit integer type.
Definition: Defs.h:69
DotsC_TypeId TypeId
A unique type identifier.
Definition: Defs.h:218
This namespace contains all the functionality and definitions of the SAFIR SDK.
Definition: Backdoor.h:30
This class is an object factory for all automatically generated DOB classes.
Definition: ObjectFactory.h:59
boost::shared_ptr< Object > ObjectPtr
A smart pointer to an Object.
Definition: Object.h:41
#define DOTS_CPP_API
Definition: Defs.h:33
static ObjectFactory & Instance()
Get the instance of the singleton.