cocos2d-x  2.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CCBMemberVariableAssigner.h File Reference
#include "cocos2d.h"
#include "CCBValue.h"

Classes

class  CCBMemberVariableAssigner
 

Namespaces

 cocos2d
 
 cocos2d::extension
 

Constant Groups

 cocos2d
 
 cocos2d::extension
 

Macros

#define CCB_MEMBERVARIABLEASSIGNER_GLUE(TARGET, MEMBERVARIABLENAME, MEMBERVARIABLETYPE, MEMBERVARIABLE)
#define CCB_MEMBERVARIABLEASSIGNER_GLUE_WEAK(TARGET, MEMBERVARIABLENAME, MEMBERVARIABLETYPE, MEMBERVARIABLE)

Macro Definition Documentation

#define
CCB_MEMBERVARIABLEASSIGNER_GLUE
(   TARGET,
  MEMBERVARIABLENAME,
  MEMBERVARIABLETYPE,
  MEMBERVARIABLE 
)
Value:
if (pTarget == TARGET && 0 == strcmp(pMemberVariableName, (MEMBERVARIABLENAME))) { \
MEMBERVARIABLETYPE pOldVar = MEMBERVARIABLE; \
MEMBERVARIABLE = dynamic_cast<MEMBERVARIABLETYPE>(pNode); \
CC_ASSERT(MEMBERVARIABLE); \
if (pOldVar != MEMBERVARIABLE) { \
CC_SAFE_RELEASE(pOldVar); \
MEMBERVARIABLE->retain(); \
} \
return true; \
}
#define
CCB_MEMBERVARIABLEASSIGNER_GLUE_WEAK
(   TARGET,
  MEMBERVARIABLENAME,
  MEMBERVARIABLETYPE,
  MEMBERVARIABLE 
)
Value:
if (pTarget == TARGET && 0 == strcmp(pMemberVariableName, MEMBERVARIABLENAME)) { \
MEMBERVARIABLE = dynamic_cast<MEMBERVARIABLETYPE>(pNode); \
CC_ASSERT(MEMBERVARIABLE); \
return true; \
}
var
CCB_MEMBERVARIABLEASSIGNER_GLUE_WEAK
(   var,
  var,
  var,
  var 
)
Value:
if (pTarget == TARGET && 0 == strcmp(pMemberVariableName, MEMBERVARIABLENAME)) { \
MEMBERVARIABLE = dynamic_cast<MEMBERVARIABLETYPE>(pNode); \
CC_ASSERT(MEMBERVARIABLE); \
return true; \
}
local
CCB_MEMBERVARIABLEASSIGNER_GLUE_WEAK
(   local,
  local,
  local,
  local 
)
Value:
if (pTarget == TARGET && 0 == strcmp(pMemberVariableName, MEMBERVARIABLENAME)) { \
MEMBERVARIABLE = dynamic_cast<MEMBERVARIABLETYPE>(pNode); \
CC_ASSERT(MEMBERVARIABLE); \
return true; \
}