restore original CCCopying as the parent class of CCObject

This commit is contained in:
dumganhar 2012-01-17 10:00:22 +08:00
parent ea0fb47f98
commit aa4fae3980
2 changed files with 15 additions and 11 deletions

View File

@ -28,6 +28,13 @@ THE SOFTWARE.
#include "ccMacros.h"
namespace cocos2d {
CCObject* CCObject::copyWithZone(CCZone *pZone)
{
CC_UNUSED_PARAM(pZone);
CCAssert(0, "not implement");
return 0;
}
CCObject::CCObject(void)
{
static unsigned int uObjectCount = 0;
@ -95,11 +102,4 @@ bool CCObject::isEqual(const CCObject *pObject)
return this == pObject;
}
CCObject* CCObject::copyWithZone(CCZone *pZone)
{
CC_UNUSED_PARAM(pZone);
CCAssert(0, "not implement");
return 0;
}
}//namespace cocos2d

View File

@ -35,7 +35,13 @@ class CCString;
class CCNode;
class CCEvent;
class CC_DLL CCObject
class CC_DLL CCCopying
{
public:
virtual CCObject* copyWithZone(CCZone* pZone);
};
class CC_DLL CCObject : public CCCopying
{
protected:
// object id
@ -56,7 +62,7 @@ public:
unsigned int retainCount(void);
virtual bool isEqual(const CCObject* pObject);
// CCObject move to here
// Move SelectorProtocol to here
virtual void update(ccTime dt) {CC_UNUSED_PARAM(dt);};
virtual void tick(ccTime dt){CC_UNUSED_PARAM(dt);};
virtual void callfunc(){};
@ -65,8 +71,6 @@ public:
virtual void menuHandler(CCObject* pSender){CC_UNUSED_PARAM(pSender);};
virtual void eventHandler(CCEvent* pEvent) {CC_UNUSED_PARAM(pEvent);};
virtual CCObject* copyWithZone(CCZone* pZone);
friend class CCAutoreleasePool;
};