MyGUI
3.2.1
|
#include <MyGUI_FactoryManager.h>
Public Types | |
typedef delegates::CDelegate1 < IObject *& > | Delegate |
Public Types inherited from MyGUI::Singleton< FactoryManager > | |
typedef Singleton< FactoryManager > | Base |
Public Member Functions | |
FactoryManager () | |
void | initialise () |
void | shutdown () |
void | registerFactory (const std::string &_category, const std::string &_type, Delegate::IDelegate *_delegate) |
void | unregisterFactory (const std::string &_category, const std::string &_type) |
void | unregisterFactory (const std::string &_category) |
bool | isFactoryExist (const std::string &_category, const std::string &_type) |
template<typename Type > | |
void | registerFactory (const std::string &_category) |
template<typename Type > | |
void | registerFactory (const std::string &_category, const std::string &_type) |
template<typename Type > | |
void | unregisterFactory (const std::string &_category) |
IObject * | createObject (const std::string &_category, const std::string &_type) |
template<typename Type > | |
Type * | createObject (const std::string &_category) |
void | destroyObject (IObject *_object) |
Public Member Functions inherited from MyGUI::Singleton< FactoryManager > | |
Singleton () | |
virtual | ~Singleton () |
Additional Inherited Members | |
Static Public Member Functions inherited from MyGUI::Singleton< FactoryManager > | |
static FactoryManager & | getInstance () |
static FactoryManager * | getInstancePtr () |
static const char * | getClassTypeName () |
Definition at line 18 of file MyGUI_FactoryManager.h.
Definition at line 27 of file MyGUI_FactoryManager.h.
MyGUI::FactoryManager::FactoryManager | ( | ) |
Definition at line 17 of file MyGUI_FactoryManager.cpp.
IObject * MyGUI::FactoryManager::createObject | ( | const std::string & | _category, |
const std::string & | _type | ||
) |
Create object with given _category and _type. Return nullptr if there's no registered factory.
Definition at line 72 of file MyGUI_FactoryManager.cpp.
|
inline |
Create object with given _category and _type. Return nullptr if there's no registered factory.
Definition at line 63 of file MyGUI_FactoryManager.h.
void MyGUI::FactoryManager::destroyObject | ( | IObject * | _object | ) |
Destroy object
Definition at line 96 of file MyGUI_FactoryManager.cpp.
void MyGUI::FactoryManager::initialise | ( | ) |
Definition at line 22 of file MyGUI_FactoryManager.cpp.
bool MyGUI::FactoryManager::isFactoryExist | ( | const std::string & | _category, |
const std::string & | _type | ||
) |
Is factory for specified _category and _type exist.
Definition at line 118 of file MyGUI_FactoryManager.cpp.
void MyGUI::FactoryManager::registerFactory | ( | const std::string & | _category, |
const std::string & | _type, | ||
Delegate::IDelegate * | _delegate | ||
) |
Register delegate function that creates object for specified _category and _type.
Definition at line 40 of file MyGUI_FactoryManager.cpp.
|
inline |
Register factory for specified _category.
Definition at line 40 of file MyGUI_FactoryManager.h.
|
inline |
Register factory for specified _category and _type.
Definition at line 47 of file MyGUI_FactoryManager.h.
void MyGUI::FactoryManager::shutdown | ( | ) |
Definition at line 31 of file MyGUI_FactoryManager.cpp.
void MyGUI::FactoryManager::unregisterFactory | ( | const std::string & | _category, |
const std::string & | _type | ||
) |
Unregister delegate function that creates object for specified _category and _type.
Definition at line 46 of file MyGUI_FactoryManager.cpp.
void MyGUI::FactoryManager::unregisterFactory | ( | const std::string & | _category | ) |
Unregister all delegate functions that creates object for specified _category.
Definition at line 62 of file MyGUI_FactoryManager.cpp.
|
inline |
Unegister factory for specified _category.
Definition at line 54 of file MyGUI_FactoryManager.h.