cocos2d-x  3.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CCAllocatorMacros.h File Reference

Macros

#define NS_CC_ALLOCATOR_BEGIN
#define NS_CC_ALLOCATOR_END
#define USING_NS_CC_ALLOCATOR
#define NS_CC_ALLOCATOR
#define CC_ALLOCATOR_INLINE   inline
#define LOG
#define CC_NEW(klass,...)   new klass(__VAR_ARGS__)
#define CC_DELETE(object)   delete object
#define CC_MALLOC(size)   malloc(size)
#define CC_FREE(address)   free(address)
#define CC_ALLOCA(size)   alloca(size)
#define CC_USE_ALLOCATOR_POOL(...)
#define CC_OVERRIDE_GLOBAL_NEWDELETE_WITH_ALLOCATOR(...)
#define DUMP(a, l, C)

Macro Definition Documentation

#define CC_ALLOCA (   size)    alloca(size)
var CC_ALLOCA (   var)    alloca(size)
local CC_ALLOCA (   local)    alloca(size)
#define CC_ALLOCATOR_INLINE   inline
var CC_ALLOCATOR_INLINE   inline
local CC_ALLOCATOR_INLINE   inline
#define CC_DELETE (   object)    delete object
var CC_DELETE (   var)    delete object
local CC_DELETE (   local)    delete object
#define CC_FREE (   address)    free(address)
var CC_FREE (   var)    free(address)
local CC_FREE (   local)    free(address)
#define CC_MALLOC (   size)    malloc(size)
var CC_MALLOC (   var)    malloc(size)
local CC_MALLOC (   local)    malloc(size)
#define CC_NEW (   klass,
  ... 
)    new klass(__VAR_ARGS__)
var CC_NEW (   var,
  ... 
)    new klass(__VAR_ARGS__)
local CC_NEW (   local,
  ... 
)    new klass(__VAR_ARGS__)
#define
CC_OVERRIDE_GLOBAL_NEWDELETE_WITH_ALLOCATOR
(   ...)
var
CC_OVERRIDE_GLOBAL_NEWDELETE_WITH_ALLOCATOR
(   ...)
local
CC_OVERRIDE_GLOBAL_NEWDELETE_WITH_ALLOCATOR
(   ...)
#define CC_USE_ALLOCATOR_POOL (   ...)
var CC_USE_ALLOCATOR_POOL (   ...)
local CC_USE_ALLOCATOR_POOL (   ...)
#define DUMP (   a,
  l,
 
)
Value:
{ \
LOG("> %p len %zu\n", a, l); \
uint8_t* p = (uint8_t*)a; \
uint8_t* e = p + l; \
while (p < e) \
{ \
LOG("%p ", p); \
for (int i = 0; i < C && &p[i] < e; ++i) \
LOG("%02x ", p[i]); \
for (int i = 0; i < C && &p[i] < e; ++i) \
LOG("%c ", isalnum(p[i]) ? p[i] : '.'); \
LOG("\n"); \
p = p + C > e ? e : p + C; \
} \
}
#define LOG
Definition: CCAllocatorMacros.h:58
unsigned char uint8_t
Definition: stdint.h:81
var DUMP (   var,
  var,
  var 
)
Value:
{ \
LOG("> %p len %zu\n", a, l); \
uint8_t* p = (uint8_t*)a; \
uint8_t* e = p + l; \
while (p < e) \
{ \
LOG("%p ", p); \
for (int i = 0; i < C && &p[i] < e; ++i) \
LOG("%02x ", p[i]); \
for (int i = 0; i < C && &p[i] < e; ++i) \
LOG("%c ", isalnum(p[i]) ? p[i] : '.'); \
LOG("\n"); \
p = p + C > e ? e : p + C; \
} \
}
#define LOG
Definition: CCAllocatorMacros.h:58
unsigned char uint8_t
Definition: stdint.h:81
local DUMP (   local,
  local,
  local 
)
Value:
{ \
LOG("> %p len %zu\n", a, l); \
uint8_t* p = (uint8_t*)a; \
uint8_t* e = p + l; \
while (p < e) \
{ \
LOG("%p ", p); \
for (int i = 0; i < C && &p[i] < e; ++i) \
LOG("%02x ", p[i]); \
for (int i = 0; i < C && &p[i] < e; ++i) \
LOG("%c ", isalnum(p[i]) ? p[i] : '.'); \
LOG("\n"); \
p = p + C > e ? e : p + C; \
} \
}
#define LOG
Definition: CCAllocatorMacros.h:58
unsigned char uint8_t
Definition: stdint.h:81
#define LOG
#define NS_CC_ALLOCATOR
var NS_CC_ALLOCATOR
local NS_CC_ALLOCATOR
#define NS_CC_ALLOCATOR_BEGIN
var NS_CC_ALLOCATOR_BEGIN
local NS_CC_ALLOCATOR_BEGIN
#define NS_CC_ALLOCATOR_END
var NS_CC_ALLOCATOR_END
local NS_CC_ALLOCATOR_END
#define USING_NS_CC_ALLOCATOR
var USING_NS_CC_ALLOCATOR
local USING_NS_CC_ALLOCATOR