namespace cocos2d { class CCNode; class CCEvent; class SelectorProtocol { public: SelectorProtocol(); void update(ccTime dt); void tick(ccTime dt); void callfunc(); void callfunc(CCNode* pSender); void callfunc(CCNode* pSender, void* pData); void menuHandler(CCObject* pSender); void eventHandler(CCEvent* pEvent); }; /* class CCNode; typedef void (SelectorProtocol::*SEL_SCHEDULE)(ccTime); typedef void (SelectorProtocol::*SEL_CallFunc)(); typedef void (SelectorProtocol::*SEL_CallFuncN)(CCNode*); typedef void (SelectorProtocol::*SEL_CallFuncND)(CCNode*, void*); typedef void (SelectorProtocol::*SEL_CallFuncO)(CCObject*); typedef void (SelectorProtocol::*SEL_MenuHandler)(CCObject*); typedef void (SelectorProtocol::*SEL_EventHandler)(CCEvent*); // #define schedule_selector(_SELECTOR) (SEL_SCHEDULE)(*((SEL_SCHEDULE*)(&(&_SELECTOR))) ) // #define callfunc_selector(_SELECTOR) (SEL_CallFunc)(*((SEL_CallFunc*)(&(&_SELECTOR))) ) // #define callfuncN_selector(_SELECTOR) (SEL_CallFuncN)(*((SEL_CallFuncN*)(&(&_SELECTOR))) ) // #define callfuncND_selector(_SELECTOR) (SEL_CallFuncND)(*((SEL_CallFuncND*)(&(&_SELECTOR))) ) // #define menu_selector(_SELECTOR) (SEL_MenuHandler)(*((SEL_MenuHandler*)(&(&_SELECTOR))) #define schedule_selector(_SELECTOR) (SEL_SCHEDULE)(&_SELECTOR) #define callfunc_selector(_SELECTOR) (SEL_CallFunc)(&_SELECTOR) #define callfuncN_selector(_SELECTOR) (SEL_CallFuncN)(&_SELECTOR) #define callfuncND_selector(_SELECTOR) (SEL_CallFuncND)(&_SELECTOR) #define callfuncO_selector(_SELECTOR) (SEL_CallFuncO)(&_SELECTOR) #define menu_selector(_SELECTOR) (SEL_MenuHandler)(&_SELECTOR) #define event_selector(_SELECTOR) (SEL_EventHandler)(&_SELECTOR) */ }//namespace cocos2d