mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-22 23:48:08 -05:00
Half revert constructors, having two types
This commit is contained in:
parent
29fde5fac5
commit
7dba804969
34 changed files with 101 additions and 43 deletions
|
@ -34,7 +34,10 @@ public:
|
||||||
static constexpr auto CLASS_NAME = "{class_name}";
|
static constexpr auto CLASS_NAME = "{class_name}";
|
||||||
)GEN";
|
)GEN";
|
||||||
|
|
||||||
char const* zero_constructor = R"GEN( GEODE_ZERO_CONSTRUCTOR({class_name}, {first_base})
|
char const* custom_constructor = R"GEN( GEODE_CUSTOM_CONSTRUCTOR_GD({class_name}, {first_base})
|
||||||
|
)GEN";
|
||||||
|
|
||||||
|
char const* custom_constructor_cutoff = R"GEN( GEODE_CUSTOM_CONSTRUCTOR_CUTOFF({class_name}, {first_base})
|
||||||
)GEN";
|
)GEN";
|
||||||
|
|
||||||
char const* function_definition = R"GEN(
|
char const* function_definition = R"GEN(
|
||||||
|
@ -177,7 +180,9 @@ std::string generateBindingHeader(Root& root, ghc::filesystem::path const& singl
|
||||||
// what.
|
// what.
|
||||||
if (!cls.superclasses.empty()) {
|
if (!cls.superclasses.empty()) {
|
||||||
single_output += fmt::format(
|
single_output += fmt::format(
|
||||||
format_strings::zero_constructor,
|
can_find(cls.superclasses[0], "cocos2d")
|
||||||
|
? format_strings::custom_constructor_cutoff
|
||||||
|
: format_strings::custom_constructor,
|
||||||
fmt::arg("class_name", cls.name),
|
fmt::arg("class_name", cls.name),
|
||||||
fmt::arg("first_base", cls.superclasses[0])
|
fmt::arg("first_base", cls.superclasses[0])
|
||||||
);
|
);
|
||||||
|
|
|
@ -85,13 +85,13 @@ auto {class_name}::{function_name}({parameters}){const} -> decltype({function_na
|
||||||
reinterpret_cast<FunctionType>(func)(this{parameter_comma}{arguments});
|
reinterpret_cast<FunctionType>(func)(this{parameter_comma}{arguments});
|
||||||
// we need to construct it back so that it uhhh ummm doesnt crash
|
// we need to construct it back so that it uhhh ummm doesnt crash
|
||||||
// while going to the child destructors
|
// while going to the child destructors
|
||||||
auto thing = new (this) {class_name}(geode::ZeroConstructor);
|
auto thing = new (this) {class_name}(geode::CutoffConstructor, sizeof({class_name}));
|
||||||
CCDestructor::lock(this) = true;
|
CCDestructor::lock(this) = true;
|
||||||
}}
|
}}
|
||||||
)GEN";
|
)GEN";
|
||||||
|
|
||||||
char const* declare_constructor = R"GEN(
|
char const* declare_constructor = R"GEN(
|
||||||
{class_name}::{function_name}({parameters}) : {class_name}(geode::ZeroConstructor) {{
|
{class_name}::{function_name}({parameters}) : {class_name}(geode::CutoffConstructor, sizeof({class_name})) {{
|
||||||
// here we construct it as normal as we can, then destruct it
|
// here we construct it as normal as we can, then destruct it
|
||||||
// using the generated functions. this ensures no memory gets leaked
|
// using the generated functions. this ensures no memory gets leaked
|
||||||
// no crashes :pray:
|
// no crashes :pray:
|
||||||
|
|
|
@ -73,8 +73,28 @@ namespace geode {
|
||||||
struct ZeroConstructorType {};
|
struct ZeroConstructorType {};
|
||||||
|
|
||||||
static constexpr auto ZeroConstructor = ZeroConstructorType();
|
static constexpr auto ZeroConstructor = ZeroConstructorType();
|
||||||
|
|
||||||
|
struct CutoffConstructorType {};
|
||||||
|
|
||||||
|
static constexpr auto CutoffConstructor = CutoffConstructorType();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define GEODE_CUSTOM_CONSTRUCTOR_BEGIN(Class_) \
|
||||||
|
GEODE_ZERO_CONSTRUCTOR_BEGIN(Class_) \
|
||||||
|
GEODE_CUTOFF_CONSTRUCTOR_BEGIN(Class_)
|
||||||
|
|
||||||
|
#define GEODE_CUSTOM_CONSTRUCTOR_COCOS(Class_, Base_) \
|
||||||
|
GEODE_ZERO_CONSTRUCTOR(Class_, Base_) \
|
||||||
|
GEODE_CUTOFF_CONSTRUCTOR_COCOS(Class_, Base_)
|
||||||
|
|
||||||
|
#define GEODE_CUSTOM_CONSTRUCTOR_GD(Class_, Base_) \
|
||||||
|
GEODE_ZERO_CONSTRUCTOR(Class_, Base_) \
|
||||||
|
GEODE_CUTOFF_CONSTRUCTOR_GD(Class_, Base_)
|
||||||
|
|
||||||
|
#define GEODE_CUSTOM_CONSTRUCTOR_CUTOFF(Class_, Base_) \
|
||||||
|
GEODE_ZERO_CONSTRUCTOR(Class_, Base_) \
|
||||||
|
GEODE_CUTOFF_CONSTRUCTOR_CUTOFF(Class_, Base_)
|
||||||
|
|
||||||
#define GEODE_ZERO_CONSTRUCTOR_BEGIN(Class_) \
|
#define GEODE_ZERO_CONSTRUCTOR_BEGIN(Class_) \
|
||||||
Class_(geode::ZeroConstructorType, void*) {} \
|
Class_(geode::ZeroConstructorType, void*) {} \
|
||||||
Class_(geode::ZeroConstructorType, size_t fill) : \
|
Class_(geode::ZeroConstructorType, size_t fill) : \
|
||||||
|
@ -85,6 +105,39 @@ namespace geode {
|
||||||
Class_(geode::ZeroConstructorType, size_t fill) : Base_(geode::ZeroConstructor, fill) {} \
|
Class_(geode::ZeroConstructorType, size_t fill) : Base_(geode::ZeroConstructor, fill) {} \
|
||||||
Class_(geode::ZeroConstructorType) : Base_(geode::ZeroConstructor, sizeof(Class_)) {}
|
Class_(geode::ZeroConstructorType) : Base_(geode::ZeroConstructor, sizeof(Class_)) {}
|
||||||
|
|
||||||
|
#define GEODE_FILL_CONSTRUCTOR(Class_, Offset_) \
|
||||||
|
Class_(geode::CutoffConstructorType, size_t fill) : \
|
||||||
|
Class_( \
|
||||||
|
geode::CutoffConstructor, \
|
||||||
|
std::memset(reinterpret_cast<std::byte*>(this) + Offset_, 0, fill - Offset_) \
|
||||||
|
) {} \
|
||||||
|
Class_(geode::CutoffConstructorType, void*)
|
||||||
|
|
||||||
|
#define GEODE_CUTOFF_CONSTRUCTOR_BEGIN(Class_) \
|
||||||
|
GEODE_MACOS(GEODE_FILL_CONSTRUCTOR(Class_, 0){}) \
|
||||||
|
GEODE_IOS(GEODE_FILL_CONSTRUCTOR(Class_, 0){})
|
||||||
|
|
||||||
|
#define GEODE_CUTOFF_CONSTRUCTOR_COCOS(Class_, Base_) \
|
||||||
|
GEODE_MACOS(Class_(geode::CutoffConstructorType, size_t fill) \
|
||||||
|
: Base_(geode::CutoffConstructor, fill){}) \
|
||||||
|
GEODE_IOS(Class_(geode::CutoffConstructorType, size_t fill) \
|
||||||
|
: Base_(geode::CutoffConstructor, fill){})
|
||||||
|
|
||||||
|
#define GEODE_CUTOFF_CONSTRUCTOR_GD(Class_, Base_) \
|
||||||
|
GEODE_WINDOWS(Class_(geode::CutoffConstructorType, size_t fill) \
|
||||||
|
: Base_(geode::CutoffConstructor, fill){}) \
|
||||||
|
GEODE_MACOS(Class_(geode::CutoffConstructorType, size_t fill) \
|
||||||
|
: Base_(geode::CutoffConstructor, fill){}) \
|
||||||
|
GEODE_IOS(Class_(geode::CutoffConstructorType, size_t fill) \
|
||||||
|
: Base_(geode::CutoffConstructor, fill){})
|
||||||
|
|
||||||
|
#define GEODE_CUTOFF_CONSTRUCTOR_CUTOFF(Class_, Base_) \
|
||||||
|
GEODE_WINDOWS(GEODE_FILL_CONSTRUCTOR(Class_, sizeof(Base_)) : Base_(){}) \
|
||||||
|
GEODE_MACOS(Class_(geode::CutoffConstructorType, size_t fill) \
|
||||||
|
: Base_(geode::CutoffConstructor, fill){}) \
|
||||||
|
GEODE_IOS(Class_(geode::CutoffConstructorType, size_t fill) \
|
||||||
|
: Base_(geode::CutoffConstructor, fill){})
|
||||||
|
|
||||||
#define GEODE_NUMBER_OF_ARGS(...) \
|
#define GEODE_NUMBER_OF_ARGS(...) \
|
||||||
GEODE_EXPAND(GEODE_NUMBER_OF_ARGS_(__VA_ARGS__, GEODE_NUMBER_SEQUENCE(), ))
|
GEODE_EXPAND(GEODE_NUMBER_OF_ARGS_(__VA_ARGS__, GEODE_NUMBER_SEQUENCE(), ))
|
||||||
#define GEODE_NUMBER_OF_ARGS_(...) GEODE_EXPAND(GEODE_NUMBER_OF_ARGS_N(__VA_ARGS__))
|
#define GEODE_NUMBER_OF_ARGS_(...) GEODE_EXPAND(GEODE_NUMBER_OF_ARGS_N(__VA_ARGS__))
|
||||||
|
|
2
loader/include/Geode/cocos/CCDirector.h
vendored
2
loader/include/Geode/cocos/CCDirector.h
vendored
|
@ -121,7 +121,7 @@ public:
|
||||||
* @js ctor
|
* @js ctor
|
||||||
*/
|
*/
|
||||||
CCDirector(void);
|
CCDirector(void);
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCDirector, CCObject)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCDirector, CCObject)
|
||||||
/**
|
/**
|
||||||
* @js NA
|
* @js NA
|
||||||
* @lua NA
|
* @lua NA
|
||||||
|
|
2
loader/include/Geode/cocos/CCScheduler.h
vendored
2
loader/include/Geode/cocos/CCScheduler.h
vendored
|
@ -141,7 +141,7 @@ class CC_DLL CCScheduler : public CCObject
|
||||||
GEODE_FRIEND_MODIFY
|
GEODE_FRIEND_MODIFY
|
||||||
public:
|
public:
|
||||||
CCScheduler();
|
CCScheduler();
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCScheduler, CCObject)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCScheduler, CCObject)
|
||||||
/**
|
/**
|
||||||
* @js NA
|
* @js NA
|
||||||
* @lua NA
|
* @lua NA
|
||||||
|
|
|
@ -140,7 +140,7 @@ public:
|
||||||
* @js ctor
|
* @js ctor
|
||||||
*/
|
*/
|
||||||
CCNode(void);
|
CCNode(void);
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCNode, CCObject)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCNode, CCObject)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default destructor
|
* Default destructor
|
||||||
|
@ -1638,7 +1638,7 @@ public:
|
||||||
* @js ctor
|
* @js ctor
|
||||||
*/
|
*/
|
||||||
CCNodeRGBA();
|
CCNodeRGBA();
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCNodeRGBA, CCNode)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCNodeRGBA, CCNode)
|
||||||
/**
|
/**
|
||||||
* @js NA
|
* @js NA
|
||||||
* @lua NA
|
* @lua NA
|
||||||
|
|
2
loader/include/Geode/cocos/cocoa/CCObject.h
vendored
2
loader/include/Geode/cocos/cocoa/CCObject.h
vendored
|
@ -112,7 +112,7 @@ protected:
|
||||||
int m_nUnknown;
|
int m_nUnknown;
|
||||||
)
|
)
|
||||||
public:
|
public:
|
||||||
GEODE_ZERO_CONSTRUCTOR_BEGIN(CCObject)
|
GEODE_CUSTOM_CONSTRUCTOR_BEGIN(CCObject)
|
||||||
CCObject(void);
|
CCObject(void);
|
||||||
/**
|
/**
|
||||||
* @lua NA
|
* @lua NA
|
||||||
|
|
2
loader/include/Geode/cocos/cocoa/CCSet.h
vendored
2
loader/include/Geode/cocos/cocoa/CCSet.h
vendored
|
@ -46,7 +46,7 @@ public:
|
||||||
* @lua NA
|
* @lua NA
|
||||||
*/
|
*/
|
||||||
CCSet(void);
|
CCSet(void);
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCSet, CCObject)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCSet, CCObject)
|
||||||
/**
|
/**
|
||||||
* @lua NA
|
* @lua NA
|
||||||
*/
|
*/
|
||||||
|
|
2
loader/include/Geode/cocos/cocoa/CCString.h
vendored
2
loader/include/Geode/cocos/cocoa/CCString.h
vendored
|
@ -47,7 +47,7 @@ class CC_DLL CCString : public CCObject
|
||||||
{
|
{
|
||||||
GEODE_FRIEND_MODIFY
|
GEODE_FRIEND_MODIFY
|
||||||
public:
|
public:
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCString, CCObject)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCString, CCObject)
|
||||||
/**
|
/**
|
||||||
* @lua NA
|
* @lua NA
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -94,7 +94,7 @@ public:
|
||||||
void setBlendFunc(const ccBlendFunc &blendFunc);
|
void setBlendFunc(const ccBlendFunc &blendFunc);
|
||||||
|
|
||||||
CCDrawNode();
|
CCDrawNode();
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCDrawNode, CCNodeRGBA)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCDrawNode, CCNodeRGBA)
|
||||||
|
|
||||||
/** listen the event that coming to foreground on Android
|
/** listen the event that coming to foreground on Android
|
||||||
* @js NA
|
* @js NA
|
||||||
|
|
|
@ -139,7 +139,7 @@ public:
|
||||||
* @js ctor
|
* @js ctor
|
||||||
*/
|
*/
|
||||||
CCControl();
|
CCControl();
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCControl, CCLayerRGBA)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCControl, CCLayerRGBA)
|
||||||
|
|
||||||
virtual bool init(void);
|
virtual bool init(void);
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -58,7 +58,7 @@ public:
|
||||||
virtual void setColorValue(ccColor3B const&);
|
virtual void setColorValue(ccColor3B const&);
|
||||||
)
|
)
|
||||||
|
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCControlColourPicker, CCControl)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCControlColourPicker, CCControl)
|
||||||
CCControlColourPicker();
|
CCControlColourPicker();
|
||||||
virtual ~CCControlColourPicker();
|
virtual ~CCControlColourPicker();
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ class CC_DLL CCScale9Sprite : public CCNodeRGBA
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CCScale9Sprite();
|
CCScale9Sprite();
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCScale9Sprite, CCNodeRGBA)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCScale9Sprite, CCNodeRGBA)
|
||||||
virtual ~CCScale9Sprite();
|
virtual ~CCScale9Sprite();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -69,7 +69,7 @@ public:
|
||||||
* @js ctor
|
* @js ctor
|
||||||
*/
|
*/
|
||||||
CCScrollView();
|
CCScrollView();
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCScrollView, CCLayer)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCScrollView, CCLayer)
|
||||||
/**
|
/**
|
||||||
* @js NA
|
* @js NA
|
||||||
* @lua NA
|
* @lua NA
|
||||||
|
|
|
@ -59,7 +59,7 @@ class CC_DLL CCKeypadHandler : public CCObject
|
||||||
{
|
{
|
||||||
GEODE_FRIEND_MODIFY
|
GEODE_FRIEND_MODIFY
|
||||||
public:
|
public:
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCKeypadHandler, CCObject)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCKeypadHandler, CCObject)
|
||||||
inline CCKeypadHandler() = default;
|
inline CCKeypadHandler() = default;
|
||||||
virtual ~CCKeypadHandler(void);
|
virtual ~CCKeypadHandler(void);
|
||||||
|
|
||||||
|
|
|
@ -198,7 +198,7 @@ public:
|
||||||
* @js ctor
|
* @js ctor
|
||||||
*/
|
*/
|
||||||
CCLabelBMFont();
|
CCLabelBMFont();
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCLabelBMFont, CCSpriteBatchNode)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCLabelBMFont, CCSpriteBatchNode)
|
||||||
/**
|
/**
|
||||||
* @js NA
|
* @js NA
|
||||||
* @lua NA
|
* @lua NA
|
||||||
|
|
|
@ -63,7 +63,7 @@ public:
|
||||||
* @js ctor
|
* @js ctor
|
||||||
*/
|
*/
|
||||||
CCLabelTTF();
|
CCLabelTTF();
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCLabelTTF, CCSprite)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCLabelTTF, CCSprite)
|
||||||
/**
|
/**
|
||||||
* @js NA
|
* @js NA
|
||||||
* @lua NA
|
* @lua NA
|
||||||
|
|
|
@ -75,7 +75,7 @@ public:
|
||||||
* @js ctor
|
* @js ctor
|
||||||
*/
|
*/
|
||||||
CCLayer();
|
CCLayer();
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCLayer, CCNode)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCLayer, CCNode)
|
||||||
/**
|
/**
|
||||||
* @js NA
|
* @js NA
|
||||||
* @lua NA
|
* @lua NA
|
||||||
|
@ -233,7 +233,7 @@ public:
|
||||||
* @js ctor
|
* @js ctor
|
||||||
*/
|
*/
|
||||||
CCLayerRGBA();
|
CCLayerRGBA();
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCLayerRGBA, CCLayer)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCLayerRGBA, CCLayer)
|
||||||
/**
|
/**
|
||||||
* @js NA
|
* @js NA
|
||||||
* @lua NA
|
* @lua NA
|
||||||
|
@ -290,7 +290,7 @@ public:
|
||||||
* @js ctor
|
* @js ctor
|
||||||
*/
|
*/
|
||||||
CCLayerColor();
|
CCLayerColor();
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCLayerColor, CCLayerRGBA)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCLayerColor, CCLayerRGBA)
|
||||||
/**
|
/**
|
||||||
* @js NA
|
* @js NA
|
||||||
* @lua NA
|
* @lua NA
|
||||||
|
|
|
@ -63,7 +63,7 @@ public:
|
||||||
* @js ctor
|
* @js ctor
|
||||||
*/
|
*/
|
||||||
CCScene();
|
CCScene();
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCScene, CCNode)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCScene, CCNode)
|
||||||
/**
|
/**
|
||||||
* @js NA
|
* @js NA
|
||||||
* @lua NA
|
* @lua NA
|
||||||
|
|
|
@ -64,7 +64,7 @@ public:
|
||||||
* @js ctor
|
* @js ctor
|
||||||
*/
|
*/
|
||||||
CCMenu() : m_pSelectedItem(NULL) {}
|
CCMenu() : m_pSelectedItem(NULL) {}
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCMenu, CCLayerRGBA)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCMenu, CCLayerRGBA)
|
||||||
/**
|
/**
|
||||||
* @js NA
|
* @js NA
|
||||||
* @lua NA
|
* @lua NA
|
||||||
|
|
|
@ -71,7 +71,7 @@ public:
|
||||||
, m_pfnSelector(NULL)
|
, m_pfnSelector(NULL)
|
||||||
, m_nScriptTapHandler(0)
|
, m_nScriptTapHandler(0)
|
||||||
{}
|
{}
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCMenuItem, CCNodeRGBA)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCMenuItem, CCNodeRGBA)
|
||||||
/**
|
/**
|
||||||
* @js NA
|
* @js NA
|
||||||
* @lua NA
|
* @lua NA
|
||||||
|
@ -139,7 +139,7 @@ public:
|
||||||
: m_pLabel(NULL)
|
: m_pLabel(NULL)
|
||||||
, m_fOriginalScale(0.0)
|
, m_fOriginalScale(0.0)
|
||||||
{}
|
{}
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCMenuItemLabel, CCMenuItem)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCMenuItemLabel, CCMenuItem)
|
||||||
/**
|
/**
|
||||||
* @js NA
|
* @js NA
|
||||||
* @lua NA
|
* @lua NA
|
||||||
|
@ -292,7 +292,7 @@ public:
|
||||||
,m_pSelectedImage(NULL)
|
,m_pSelectedImage(NULL)
|
||||||
,m_pDisabledImage(NULL)
|
,m_pDisabledImage(NULL)
|
||||||
{}
|
{}
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCMenuItemSprite, CCMenuItem)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCMenuItemSprite, CCMenuItem)
|
||||||
|
|
||||||
/** creates a menu item with a normal, selected and disabled image*/
|
/** creates a menu item with a normal, selected and disabled image*/
|
||||||
static CCMenuItemSprite * create(CCNode* normalSprite, CCNode* selectedSprite, CCNode* disabledSprite = NULL);
|
static CCMenuItemSprite * create(CCNode* normalSprite, CCNode* selectedSprite, CCNode* disabledSprite = NULL);
|
||||||
|
@ -337,7 +337,7 @@ public:
|
||||||
* @lua NA
|
* @lua NA
|
||||||
*/
|
*/
|
||||||
CCMenuItemImage(){}
|
CCMenuItemImage(){}
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCMenuItemImage, CCMenuItemSprite)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCMenuItemImage, CCMenuItemSprite)
|
||||||
/**
|
/**
|
||||||
* @js NA
|
* @js NA
|
||||||
* @lua NA
|
* @lua NA
|
||||||
|
|
|
@ -53,7 +53,7 @@ class CC_DLL CCFileUtils : public TypeInfo
|
||||||
friend class CCDictionary;
|
friend class CCDictionary;
|
||||||
public:
|
public:
|
||||||
|
|
||||||
GEODE_ZERO_CONSTRUCTOR_BEGIN(CCFileUtils)
|
GEODE_CUSTOM_CONSTRUCTOR_BEGIN(CCFileUtils)
|
||||||
/**
|
/**
|
||||||
* Returns an unique ID for this class.
|
* Returns an unique ID for this class.
|
||||||
* @note It's only used for JSBindings now.
|
* @note It's only used for JSBindings now.
|
||||||
|
|
|
@ -46,7 +46,7 @@ public:
|
||||||
@js ctor
|
@js ctor
|
||||||
*/
|
*/
|
||||||
CCImage();
|
CCImage();
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCImage, CCObject)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCImage, CCObject)
|
||||||
/**
|
/**
|
||||||
* @js NA
|
* @js NA
|
||||||
* @lua NA
|
* @lua NA
|
||||||
|
|
|
@ -36,7 +36,7 @@ class CC_DLL CCApplication : public CCApplicationProtocol
|
||||||
{
|
{
|
||||||
GEODE_FRIEND_MODIFY
|
GEODE_FRIEND_MODIFY
|
||||||
public:
|
public:
|
||||||
GEODE_ZERO_CONSTRUCTOR_BEGIN(CCApplication)
|
GEODE_CUSTOM_CONSTRUCTOR_BEGIN(CCApplication)
|
||||||
CCApplication();
|
CCApplication();
|
||||||
/**
|
/**
|
||||||
* @js NA
|
* @js NA
|
||||||
|
|
|
@ -35,7 +35,7 @@ class CC_DLL CCApplication : public CCApplicationProtocol
|
||||||
{
|
{
|
||||||
GEODE_FRIEND_MODIFY
|
GEODE_FRIEND_MODIFY
|
||||||
public:
|
public:
|
||||||
GEODE_ZERO_CONSTRUCTOR_BEGIN(CCApplication)
|
GEODE_CUSTOM_CONSTRUCTOR_BEGIN(CCApplication)
|
||||||
CCApplication();
|
CCApplication();
|
||||||
virtual ~CCApplication();
|
virtual ~CCApplication();
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ class CC_DLL CCApplication : public CCApplicationProtocol
|
||||||
{
|
{
|
||||||
GEODE_FRIEND_MODIFY
|
GEODE_FRIEND_MODIFY
|
||||||
public:
|
public:
|
||||||
GEODE_ZERO_CONSTRUCTOR_BEGIN(CCApplication)
|
GEODE_CUSTOM_CONSTRUCTOR_BEGIN(CCApplication)
|
||||||
CCApplication();
|
CCApplication();
|
||||||
virtual ~CCApplication();
|
virtual ~CCApplication();
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ protected:
|
||||||
RT_ADD( virtual ~CCEGLView(); )
|
RT_ADD( virtual ~CCEGLView(); )
|
||||||
public:
|
public:
|
||||||
CCEGLView();
|
CCEGLView();
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCEGLView, CCObject)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCEGLView, CCObject)
|
||||||
RT_REMOVE( virtual ~CCEGLView(); )
|
RT_REMOVE( virtual ~CCEGLView(); )
|
||||||
|
|
||||||
/* override functions */
|
/* override functions */
|
||||||
|
|
|
@ -207,7 +207,7 @@ RT_ADD(
|
||||||
class CC_DLL CCKeyboardHandler : public CCObject
|
class CC_DLL CCKeyboardHandler : public CCObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCKeyboardHandler, CCObject)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCKeyboardHandler, CCObject)
|
||||||
inline CCKeyboardHandler() = default;
|
inline CCKeyboardHandler() = default;
|
||||||
|
|
||||||
virtual ~CCKeyboardHandler();
|
virtual ~CCKeyboardHandler();
|
||||||
|
|
|
@ -22,7 +22,7 @@ RT_ADD(
|
||||||
class CC_DLL CCMouseHandler : public CCObject
|
class CC_DLL CCMouseHandler : public CCObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCMouseHandler, CCObject)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCMouseHandler, CCObject)
|
||||||
inline CCMouseHandler() = default;
|
inline CCMouseHandler() = default;
|
||||||
|
|
||||||
virtual ~CCMouseHandler();
|
virtual ~CCMouseHandler();
|
||||||
|
|
|
@ -168,7 +168,7 @@ public:
|
||||||
* @js ctor
|
* @js ctor
|
||||||
*/
|
*/
|
||||||
CCSprite(void);
|
CCSprite(void);
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCSprite, CCNodeRGBA)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCSprite, CCNodeRGBA)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default destructor
|
* Default destructor
|
||||||
|
|
|
@ -68,7 +68,7 @@ public:
|
||||||
* @js ctor
|
* @js ctor
|
||||||
*/
|
*/
|
||||||
CCSpriteBatchNode();
|
CCSpriteBatchNode();
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCSpriteBatchNode, CCNode)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCSpriteBatchNode, CCNode)
|
||||||
/**
|
/**
|
||||||
* @js NA
|
* @js NA
|
||||||
* @lua NA
|
* @lua NA
|
||||||
|
|
|
@ -50,7 +50,7 @@ class CC_DLL CCIMEDelegate
|
||||||
{
|
{
|
||||||
GEODE_FRIEND_MODIFY
|
GEODE_FRIEND_MODIFY
|
||||||
public:
|
public:
|
||||||
GEODE_ZERO_CONSTRUCTOR_BEGIN(CCIMEDelegate)
|
GEODE_CUSTOM_CONSTRUCTOR_BEGIN(CCIMEDelegate)
|
||||||
virtual ~CCIMEDelegate();
|
virtual ~CCIMEDelegate();
|
||||||
|
|
||||||
virtual bool attachWithIME();
|
virtual bool attachWithIME();
|
||||||
|
|
|
@ -117,7 +117,7 @@ public:
|
||||||
* @js ctor
|
* @js ctor
|
||||||
*/
|
*/
|
||||||
CCTexture2D();
|
CCTexture2D();
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCTexture2D, CCObject)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTexture2D, CCObject)
|
||||||
/**
|
/**
|
||||||
* @js NA
|
* @js NA
|
||||||
* @lua NA
|
* @lua NA
|
||||||
|
|
|
@ -48,7 +48,7 @@ class CC_DLL CCTouchHandler : public CCObject
|
||||||
{
|
{
|
||||||
GEODE_FRIEND_MODIFY
|
GEODE_FRIEND_MODIFY
|
||||||
public:
|
public:
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCTouchHandler, CCObject)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTouchHandler, CCObject)
|
||||||
inline CCTouchHandler() = default;
|
inline CCTouchHandler() = default;
|
||||||
virtual ~CCTouchHandler(void);
|
virtual ~CCTouchHandler(void);
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ class CC_DLL CCStandardTouchHandler : public CCTouchHandler
|
||||||
{
|
{
|
||||||
GEODE_FRIEND_MODIFY
|
GEODE_FRIEND_MODIFY
|
||||||
public:
|
public:
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCStandardTouchHandler, CCTouchHandler)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCStandardTouchHandler, CCTouchHandler)
|
||||||
inline CCStandardTouchHandler() = default;
|
inline CCStandardTouchHandler() = default;
|
||||||
|
|
||||||
~CCStandardTouchHandler(void);
|
~CCStandardTouchHandler(void);
|
||||||
|
@ -110,7 +110,7 @@ class CC_DLL CCTargetedTouchHandler : public CCTouchHandler
|
||||||
{
|
{
|
||||||
GEODE_FRIEND_MODIFY
|
GEODE_FRIEND_MODIFY
|
||||||
public:
|
public:
|
||||||
GEODE_ZERO_CONSTRUCTOR(CCTargetedTouchHandler, CCTouchHandler)
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCTargetedTouchHandler, CCTouchHandler)
|
||||||
inline CCTargetedTouchHandler() = default;
|
inline CCTargetedTouchHandler() = default;
|
||||||
|
|
||||||
~CCTargetedTouchHandler(void);
|
~CCTargetedTouchHandler(void);
|
||||||
|
|
Loading…
Reference in a new issue