issue #5 : add description to CCNode

This commit is contained in:
Walzer 2010-07-15 03:39:05 +00:00
parent df8150582c
commit 8eff6998dd
2 changed files with 10 additions and 5 deletions

View File

@ -83,7 +83,7 @@ void CCNode::arrayMakeObjectsPerformSelector(NSMutableArray * pArray, callbackFu
{
pNode = static_cast<CCNode*>(*it);
if(pNode)
if(pNode && func)
{
(pNode->*func)();
}
@ -398,12 +398,15 @@ void CCNode::cleanup()
arrayMakeObjectsPerformSelector(m_pChildren, &CCNode::cleanup);
}
/** @todo no declare in class
- (NSString*) description
std::string CCNode::description()
{
return [NSString stringWithFormat:@"<%@ = %08X | Tag = %i>", [self class], self, tag_];
char des[100];
sprintf_s(des, 100, "<CCNode | Tag = %i>", m_nTag);
string ret(des);
return ret;
}
*/
// lazy allocs
void CCNode::childrenAlloc(void)

View File

@ -215,6 +215,8 @@ public:
virtual ~CCNode();
std::string description(void);
/** allocates and initializes a node.
The node will be created as "autorelease".
*/