7 #ifndef __MYGUI_FACTORY_MANAGER_H__
8 #define __MYGUI_FACTORY_MANAGER_H__
29 void registerFactory(
const std::string& _category,
const std::string& _type,
Delegate::IDelegate* _delegate);
31 void unregisterFactory(
const std::string& _category,
const std::string& _type);
33 void unregisterFactory(
const std::string& _category);
36 bool isFactoryExist(
const std::string& _category,
const std::string& _type);
39 template<
typename Type>
40 void registerFactory(
const std::string& _category)
46 template<
typename Type>
47 void registerFactory(
const std::string& _category,
const std::string& _type)
53 template<
typename Type>
54 void unregisterFactory(
const std::string& _category)
56 unregisterFactory(_category, Type::getClassTypeName());
60 IObject* createObject(
const std::string& _category,
const std::string& _type);
62 template<
typename Type>
63 Type* createObject(
const std::string& _category)
65 IObject* item = createObject(_category, Type::getClassTypeName());
72 void destroyObject(
IObject* _object);
75 typedef std::map<std::string, Delegate> MapFactoryItem;
76 typedef std::map<std::string, MapFactoryItem> MapRegisterFactoryItem;
77 MapRegisterFactoryItem mRegisterFactoryItems;
84 #endif // __MYGUI_FACTORY_MANAGER_H__