/TGame/TCommon/Message/MsgHandlerIf.h
http://awoe.googlecode.com/ · C Header · 35 lines · 18 code · 10 blank · 7 comment · 0 complexity · efe031b3f9f87fd89de9d6b918cc44c4 MD5 · raw file
- #ifndef __MSG_HANDLER_INTERFACE__
- #define __MSG_HANDLER_INTERFACE__
-
- #include "MsgIf.h"
-
- class TCOM_API IMsgHandlerInitData
- {
- public:
- virtual ~IMsgHandlerInitData(){;}
- };
-
- class TCOM_API IMsgHandler
- {
- public:
- virtual ~IMsgHandler(){;}
-
- //
- //
- virtual bool initialize(IMsgHandlerInitData* data) = 0;
-
- //
- // Do handling the incoming message
- virtual bool handleMsg(IMsg* pMsg) = 0;
-
- //
- // manage sub message handler
- //
- virtual void addSubHandler(int nMsgCate, int nMsgID, IMsgHandler* pHandler) = 0;
- virtual void rmvSubHandler(int nMsgCate, int nMsgID) = 0;
- };
-
-
-
-
- #endif