Macros | |
#define | CREATE_FUNC(__TYPE__) |
define some platform specific macros More... | |
#define | NODE_FUNC(__TYPE__) |
define a node function for a specific type, such as Layer More... | |
#define | CC_ENABLE_CACHE_TEXTURE_DATA 0 |
Enable it if you want to cache the texture data. More... | |
#define | CC_REBIND_INDICES_BUFFER 0 |
#define | NS_CC_BEGIN |
#define | NS_CC_END |
#define | USING_NS_CC |
#define | CC_PROPERTY_READONLY(varType, varName, funName) |
CC_PROPERTY_READONLY is used to declare a protected variable. More... | |
#define | CC_PROPERTY_READONLY_PASS_BY_REF(varType, varName, funName) |
#define | CC_PROPERTY(varType, varName, funName) |
CC_PROPERTY is used to declare a protected variable. More... | |
#define | CC_PROPERTY_PASS_BY_REF(varType, varName, funName) |
#define | CC_SYNTHESIZE_READONLY(varType, varName, funName) |
CC_SYNTHESIZE_READONLY is used to declare a protected variable. More... | |
#define | CC_SYNTHESIZE_READONLY_PASS_BY_REF(varType, varName, funName) |
#define | CC_SYNTHESIZE(varType, varName, funName) |
CC_SYNTHESIZE is used to declare a protected variable. More... | |
#define | CC_SYNTHESIZE_PASS_BY_REF(varType, varName, funName) |
#define | CC_SYNTHESIZE_RETAIN(varType, varName, funName) |
#define | CC_SAFE_DELETE(p) do { delete (p); (p) = nullptr; } while(0) |
#define | CC_SAFE_DELETE_ARRAY(p) do { if(p) { delete[] (p); (p) = nullptr; } } while(0) |
#define | CC_SAFE_FREE(p) do { if(p) { free(p); (p) = nullptr; } } while(0) |
#define | CC_SAFE_RELEASE(p) do { if(p) { (p)->release(); } } while(0) |
#define | CC_SAFE_RELEASE_NULL(p) do { if(p) { (p)->release(); (p) = nullptr; } } while(0) |
#define | CC_SAFE_RETAIN(p) do { if(p) { (p)->retain(); } } while(0) |
#define | CC_BREAK_IF(cond) if(cond) break |
#define | __CCLOGWITHFUNCTION(s,...) log("%s : %s",__FUNCTION__, String::createWithFormat(s, ##__VA_ARGS__)->getCString()) |
#define | CCLOG(...) do {} while (0) |
#define | CCLOGINFO(...) do {} while (0) |
#define | CCLOGERROR(...) do {} while (0) |
#define | CCLOGWARN(...) do {} while (0) |
#define | LUALOG(...) |
#define | CC_DISABLE_COPY(Class) |
#define | CC_DEPRECATED_ATTRIBUTE |
#define | CC_FORMAT_PRINTF(formatPos, argPos) |
#define | CC_FORMAT_PRINTF_SIZE_T "%08zX" |
#define | CC_UNUSED |
#define | CC_REQUIRES_NULL_TERMINATION |
#define __CCLOGWITHFUNCTION | ( | s, | |
... | |||
) | log("%s : %s",__FUNCTION__, String::createWithFormat(s, ##__VA_ARGS__)->getCString()) |
var __CCLOGWITHFUNCTION | ( | var, | |
... | |||
) | log("%s : %s",__FUNCTION__, String::createWithFormat(s, ##__VA_ARGS__)->getCString()) |
#define CC_BREAK_IF | ( | cond) | if(cond) break |
var CC_BREAK_IF | ( | var) | if(cond) break |
#define CC_DEPRECATED_ATTRIBUTE |
var CC_DEPRECATED_ATTRIBUTE |
local CC_DEPRECATED_ATTRIBUTE |
#define CC_DISABLE_COPY | ( | Class) |
var CC_DISABLE_COPY | ( | var) |
local CC_DISABLE_COPY | ( | local) |
#define CC_ENABLE_CACHE_TEXTURE_DATA 0 |
Enable it if you want to cache the texture data.
Not enabling for Emscripten any more – doesn't seem necessary and don't want to be different from other platforms unless there's a good reason.
It's new in cocos2d-x since v0.99.5
var CC_ENABLE_CACHE_TEXTURE_DATA 0 |
Enable it if you want to cache the texture data.
Not enabling for Emscripten any more – doesn't seem necessary and don't want to be different from other platforms unless there's a good reason.
It's new in cocos2d-x since v0.99.5
local CC_ENABLE_CACHE_TEXTURE_DATA 0 |
Enable it if you want to cache the texture data.
Not enabling for Emscripten any more – doesn't seem necessary and don't want to be different from other platforms unless there's a good reason.
It's new in cocos2d-x since v0.99.5
#define CC_FORMAT_PRINTF | ( | formatPos, | |
argPos | |||
) |
var CC_FORMAT_PRINTF | ( | var, | |
var | |||
) |
local CC_FORMAT_PRINTF | ( | local, | |
local | |||
) |
#define CC_FORMAT_PRINTF_SIZE_T "%08zX" |
#define CC_PROPERTY | ( | varType, | |
varName, | |||
funName | |||
) |
CC_PROPERTY is used to declare a protected variable.
We can use getter to read the variable, and use the setter to change the variable.
varType | the type of variable. |
varName | variable name. |
funName | "get + funName" will be the name of the getter. "set + funName" will be the name of the setter. |
var CC_PROPERTY | ( | var, | |
var, | |||
var | |||
) |
CC_PROPERTY is used to declare a protected variable.
We can use getter to read the variable, and use the setter to change the variable.
varType | the type of variable. |
varName | variable name. |
funName | "get + funName" will be the name of the getter. "set + funName" will be the name of the setter. |
local CC_PROPERTY | ( | local, | |
local, | |||
local | |||
) |
CC_PROPERTY is used to declare a protected variable.
We can use getter to read the variable, and use the setter to change the variable.
varType | the type of variable. |
varName | variable name. |
funName | "get + funName" will be the name of the getter. "set + funName" will be the name of the setter. |
#define CC_PROPERTY_PASS_BY_REF | ( | varType, | |
varName, | |||
funName | |||
) |
var CC_PROPERTY_PASS_BY_REF | ( | var, | |
var, | |||
var | |||
) |
local CC_PROPERTY_PASS_BY_REF | ( | local, | |
local, | |||
local | |||
) |
#define CC_PROPERTY_READONLY | ( | varType, | |
varName, | |||
funName | |||
) |
CC_PROPERTY_READONLY is used to declare a protected variable.
We can use getter to read the variable.
varType | the type of variable. |
varName | variable name. |
funName | "get + funName" will be the name of the getter. |
var CC_PROPERTY_READONLY | ( | var, | |
var, | |||
var | |||
) |
CC_PROPERTY_READONLY is used to declare a protected variable.
We can use getter to read the variable.
varType | the type of variable. |
varName | variable name. |
funName | "get + funName" will be the name of the getter. |
local CC_PROPERTY_READONLY | ( | local, | |
local, | |||
local | |||
) |
CC_PROPERTY_READONLY is used to declare a protected variable.
We can use getter to read the variable.
varType | the type of variable. |
varName | variable name. |
funName | "get + funName" will be the name of the getter. |
#define CC_PROPERTY_READONLY_PASS_BY_REF |
( | varType, | |
varName, | |||
funName | |||
) |
#define CC_REBIND_INDICES_BUFFER 0 |
var CC_REBIND_INDICES_BUFFER 0 |
local CC_REBIND_INDICES_BUFFER 0 |
#define CC_REQUIRES_NULL_TERMINATION |
var CC_REQUIRES_NULL_TERMINATION |
#define CC_SAFE_DELETE | ( | p) | do { delete (p); (p) = nullptr; } while(0) |
#define CC_SAFE_DELETE_ARRAY | ( | p) | do { if(p) { delete[] (p); (p) = nullptr; } } while(0) |
var CC_SAFE_DELETE_ARRAY | ( | var) | do { if(p) { delete[] (p); (p) = nullptr; } } while(0) |
local CC_SAFE_DELETE_ARRAY | ( | local) | do { if(p) { delete[] (p); (p) = nullptr; } } while(0) |
#define CC_SAFE_FREE | ( | p) | do { if(p) { free(p); (p) = nullptr; } } while(0) |
var CC_SAFE_FREE | ( | var) | do { if(p) { free(p); (p) = nullptr; } } while(0) |
#define CC_SAFE_RELEASE | ( | p) | do { if(p) { (p)->release(); } } while(0) |
var CC_SAFE_RELEASE | ( | var) | do { if(p) { (p)->release(); } } while(0) |
local CC_SAFE_RELEASE | ( | local) | do { if(p) { (p)->release(); } } while(0) |
#define CC_SAFE_RELEASE_NULL | ( | p) | do { if(p) { (p)->release(); (p) = nullptr; } } while(0) |
var CC_SAFE_RELEASE_NULL | ( | var) | do { if(p) { (p)->release(); (p) = nullptr; } } while(0) |
local CC_SAFE_RELEASE_NULL | ( | local) | do { if(p) { (p)->release(); (p) = nullptr; } } while(0) |
#define CC_SAFE_RETAIN | ( | p) | do { if(p) { (p)->retain(); } } while(0) |
var CC_SAFE_RETAIN | ( | var) | do { if(p) { (p)->retain(); } } while(0) |
local CC_SAFE_RETAIN | ( | local) | do { if(p) { (p)->retain(); } } while(0) |
#define CC_SYNTHESIZE | ( | varType, | |
varName, | |||
funName | |||
) |
CC_SYNTHESIZE is used to declare a protected variable.
We can use getter to read the variable, and use the setter to change the variable.
varType | the type of variable. |
varName | variable name. |
funName | "get + funName" will be the name of the getter. "set + funName" will be the name of the setter. |
var CC_SYNTHESIZE | ( | var, | |
var, | |||
var | |||
) |
CC_SYNTHESIZE is used to declare a protected variable.
We can use getter to read the variable, and use the setter to change the variable.
varType | the type of variable. |
varName | variable name. |
funName | "get + funName" will be the name of the getter. "set + funName" will be the name of the setter. |
local CC_SYNTHESIZE | ( | local, | |
local, | |||
local | |||
) |
CC_SYNTHESIZE is used to declare a protected variable.
We can use getter to read the variable, and use the setter to change the variable.
varType | the type of variable. |
varName | variable name. |
funName | "get + funName" will be the name of the getter. "set + funName" will be the name of the setter. |
#define CC_SYNTHESIZE_PASS_BY_REF | ( | varType, | |
varName, | |||
funName | |||
) |
var CC_SYNTHESIZE_PASS_BY_REF | ( | var, | |
var, | |||
var | |||
) |
local CC_SYNTHESIZE_PASS_BY_REF | ( | local, | |
local, | |||
local | |||
) |
#define CC_SYNTHESIZE_READONLY | ( | varType, | |
varName, | |||
funName | |||
) |
CC_SYNTHESIZE_READONLY is used to declare a protected variable.
We can use getter to read the variable.
varType | the type of variable. |
varName | variable name. |
funName | "get + funName" will be the name of the getter. |
var CC_SYNTHESIZE_READONLY | ( | var, | |
var, | |||
var | |||
) |
CC_SYNTHESIZE_READONLY is used to declare a protected variable.
We can use getter to read the variable.
varType | the type of variable. |
varName | variable name. |
funName | "get + funName" will be the name of the getter. |
local CC_SYNTHESIZE_READONLY | ( | local, | |
local, | |||
local | |||
) |
CC_SYNTHESIZE_READONLY is used to declare a protected variable.
We can use getter to read the variable.
varType | the type of variable. |
varName | variable name. |
funName | "get + funName" will be the name of the getter. |
#define CC_SYNTHESIZE_READONLY_PASS_BY_REF |
( | varType, | |
varName, | |||
funName | |||
) |
#define CC_SYNTHESIZE_RETAIN | ( | varType, | |
varName, | |||
funName | |||
) |
var CC_SYNTHESIZE_RETAIN | ( | var, | |
var, | |||
var | |||
) |
local CC_SYNTHESIZE_RETAIN | ( | local, | |
local, | |||
local | |||
) |
#define CC_UNUSED |
#define CCLOG | ( | ...) | do {} while (0) |
var CCLOG | ( | ...) | do {} while (0) |
local CCLOG | ( | ...) | do {} while (0) |
#define CCLOGERROR | ( | ...) | do {} while (0) |
var CCLOGERROR | ( | ...) | do {} while (0) |
local CCLOGERROR | ( | ...) | do {} while (0) |
#define CCLOGINFO | ( | ...) | do {} while (0) |
var CCLOGINFO | ( | ...) | do {} while (0) |
local CCLOGINFO | ( | ...) | do {} while (0) |
#define CCLOGWARN | ( | ...) | do {} while (0) |
#define CREATE_FUNC | ( | __TYPE__) |
define some platform specific macros
define a create function for a specific type, such as Layer
__TYPE__ | class type to add create(), such as Layer |
#define LUALOG | ( | ...) |
var LUALOG | ( | ...) |
local LUALOG | ( | ...) |
#define NODE_FUNC | ( | __TYPE__) |
define a node function for a specific type, such as Layer
__TYPE__ | class type to add node(), such as Layer |
var NODE_FUNC | ( | var) |
define a node function for a specific type, such as Layer
__TYPE__ | class type to add node(), such as Layer |
local NODE_FUNC | ( | local) |
define a node function for a specific type, such as Layer
__TYPE__ | class type to add node(), such as Layer |
#define NS_CC_BEGIN |
var NS_CC_BEGIN |
local NS_CC_BEGIN |
#define NS_CC_END |
var NS_CC_END |
local NS_CC_END |
#define USING_NS_CC |