15 #include <vsg/core/Object.h>
16 #include <vsg/core/type_name.h>
33 using CreateFunction = std::function<vsg::ref_ptr<vsg::Object>()>;
34 using CreateMap = std::map<std::string, CreateFunction>;
36 CreateMap& getCreateMap() {
return _createMap; }
37 const CreateMap& getCreateMap()
const {
return _createMap; }
42 _createMap[type_name<T>()] = []() {
return T::create(); };
Definition: ObjectFactory.h:27
static ref_ptr< ObjectFactory > & instance()
return the ObjectFactory singleton instance
Definition: ObjectFactory.h:57