cocos2d-x  3.0Beta0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ObjectFactory Class Reference

#include <ObjectFactory.h>

Classes

struct  TInfo
 

Public Types

typedef cocos2d::Object *(* Instance )(void)
typedef std::unordered_map
< std::string, TInfo
FactoryMap

Public Member Functions

cocos2d::ObjectcreateObject (const std::string &name)
var createObject ( var name)
cocos2d::ComponentcreateComponent (const std::string &name)
var createComponent ( var name)
local createComponent ( local name)
void registerType (const TInfo &t)
void removeAll ()

Static Public Member Functions

static ObjectFactorygetInstance ()
local getInstance ()
static void destroyInstance ()

Protected Member Functions

 ObjectFactory (void)
virtual ~ObjectFactory (void)

Member Typedef Documentation

typedef std::unordered_map
<std::string, TInfo>
FactoryMap
local FactoryMap
typedef cocos2d::Object*(*
Instance)(void)
typedef cocos2d::Object*(*
Instance)(void)
typedef cocos2d::Object*(*
Instance)(void)

Constructor & Destructor Documentation

ObjectFactory ( void  )
protected
var ObjectFactory (   )
protected
local ObjectFactory (   )
protected
virtual ~ObjectFactory ( void  )
protectedvirtual
var ~ObjectFactory (   )
protectedvirtual
local ~ObjectFactory (   )
protectedvirtual

Member Function Documentation

cocos2d::Component* createComponent ( const std::string &  name)
var createComponent ( var  name)
local createComponent ( local  name)
cocos2d::Object* createObject ( const std::string &  name)
var createObject ( var  name)
local createObject ( local  name)
static void destroyInstance ( )
static
var destroyInstance ( )
static
local destroyInstance ( )
static
static ObjectFactory* getInstance ( )
static
var getInstance ( )
static
local getInstance ( )
static
void registerType ( const TInfo t)
var registerType ( var  t)
local registerType ( local  t)
void removeAll ( )
var removeAll ( )
local removeAll ( )

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