cocos2d-x
3.3
|
#include <ObjectFactory.h>
Classes | |
struct | TInfo |
Public Types | |
typedef cocos2d::Ref *(* | Instance )(void) |
typedef std::function < cocos2d::Ref *(void)> | InstanceFunc |
typedef std::unordered_map < std::string, TInfo > | FactoryMap |
Public Member Functions | |
cocos2d::Ref * | createObject (const std::string &name) |
void | registerType (const TInfo &t) |
void | removeAll () |
Static Public Member Functions | |
static ObjectFactory * | getInstance () |
static void | destroyInstance () |
Protected Member Functions | |
ObjectFactory (void) | |
virtual | ~ObjectFactory (void) |
typedef std::unordered_map<std::string, TInfo> FactoryMap |
typedef cocos2d::Ref*(* Instance)(void) |
typedef std::function<cocos2d::Ref* (void)> InstanceFunc |
|
protected |
|
protectedvirtual |
cocos2d::Ref* createObject | ( | const std::string & | name | ) |
|
static |
|
static |
void registerType | ( | const TInfo & | t | ) |
void removeAll | ( | ) |