7#ifndef MYGUI_FACTORY_MANAGER_H_
8#define MYGUI_FACTORY_MANAGER_H_
32 void unregisterFactory(std::string_view
_category, std::string_view
_type);
34 void unregisterFactory(std::string_view
_category);
37 bool isFactoryExist(std::string_view
_category, std::string_view
_type);
40 template<
typename Type>
47 template<
typename Type>
54 template<
typename Type>
57 unregisterFactory(
_category, Type::getClassTypeName());
63 template<
typename Type>
76 using MapFactoryItem = std::map<std::string, Delegate, std::less<>>;
77 using MapRegisterFactoryItem = std::map<std::string, MapFactoryItem, std::less<>>;
78 MapRegisterFactoryItem mRegisterFactoryItems;
80 bool mIsInitialise{
false};
#define MYGUI_SINGLETON_DECLARATION(ClassName)
void registerFactory(std::string_view _category, std::string_view _type)
void unregisterFactory(std::string_view _category)
Type * createObject(std::string_view _category)
void registerFactory(std::string_view _category)
Type * castType(bool _throw=true)