MyGUI  3.2.0
Public Types | Public Member Functions
MyGUI::FactoryManager Class Reference

#include <MyGUI_FactoryManager.h>

+ Inheritance diagram for MyGUI::FactoryManager:

Public Types

typedef delegates::CDelegate1
< IObject *& > 
Delegate

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)
IObjectcreateObject (const std::string &_category, const std::string &_type)
void destroyObject (IObject *_object)

Detailed Description

Definition at line 33 of file MyGUI_FactoryManager.h.


Member Typedef Documentation

Definition at line 42 of file MyGUI_FactoryManager.h.


Constructor & Destructor Documentation

Definition at line 32 of file MyGUI_FactoryManager.cpp.


Member Function Documentation

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 87 of file MyGUI_FactoryManager.cpp.

Destroy object

Definition at line 111 of file MyGUI_FactoryManager.cpp.

Definition at line 37 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 133 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 55 of file MyGUI_FactoryManager.cpp.

template<typename Type >
void MyGUI::FactoryManager::registerFactory ( const std::string &  _category) [inline]

Register factory for specified _category.

Definition at line 55 of file MyGUI_FactoryManager.h.

template<typename Type >
void MyGUI::FactoryManager::registerFactory ( const std::string &  _category,
const std::string &  _type 
) [inline]

Register factory for specified _category and _type.

Definition at line 62 of file MyGUI_FactoryManager.h.

Definition at line 46 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 61 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 77 of file MyGUI_FactoryManager.cpp.

template<typename Type >
void MyGUI::FactoryManager::unregisterFactory ( const std::string &  _category) [inline]

Unegister factory for specified _category.

Definition at line 69 of file MyGUI_FactoryManager.h.


The documentation for this class was generated from the following files: