29 template <> FactoryManager* Singleton<FactoryManager>::msInstance =
nullptr;
30 template <>
const char* Singleton<FactoryManager>::mClassTypeName(
"FactoryManager");
52 mIsInitialise =
false;
58 mRegisterFactoryItems[_category][_type] = _delegate;
63 MapRegisterFactoryItem::iterator category = mRegisterFactoryItems.find(_category);
64 if (category == mRegisterFactoryItems.end())
68 MapFactoryItem::iterator type = category->second.find(_type);
69 if (type == category->second.end())
74 category->second.erase(type);
79 MapRegisterFactoryItem::iterator category = mRegisterFactoryItems.find(_category);
80 if (category == mRegisterFactoryItems.end())
84 mRegisterFactoryItems.erase(category);
89 MapRegisterFactoryItem::iterator category = mRegisterFactoryItems.find(_category);
90 if (category == mRegisterFactoryItems.end())
96 MapFactoryItem::iterator type = category->second.find(typeName);
97 if (type == category->second.end())
101 if (type->second.empty())
107 type->second(result);
135 MapRegisterFactoryItem::iterator category = mRegisterFactoryItems.find(_category);
136 if (category == mRegisterFactoryItems.end())
140 MapFactoryItem::iterator type = category->second.find(_type);
141 if (type == category->second.end())
static const char * getClassTypeName()
#define MYGUI_LOG(level, text)
#define MYGUI_ASSERT(exp, dest)
static std::string getFactoryRename(const std::string &_categoryName, const std::string &_factoryName)
void unregisterFactory(const std::string &_category, const std::string &_type)
void registerFactory(const std::string &_category, const std::string &_type, Delegate::IDelegate *_delegate)
IObject * createObject(const std::string &_category, const std::string &_type)
void destroyObject(IObject *_object)
bool isFactoryExist(const std::string &_category, const std::string &_type)