PageRenderTime 16ms CodeModel.GetById 13ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/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
 1#ifndef __MSG_HANDLER_INTERFACE__
 2#define __MSG_HANDLER_INTERFACE__
 3
 4#include "MsgIf.h"
 5
 6class TCOM_API IMsgHandlerInitData
 7{
 8public:
 9	virtual ~IMsgHandlerInitData(){;}
10};
11
12class TCOM_API IMsgHandler
13{
14public:
15	virtual ~IMsgHandler(){;}
16
17	//
18	//
19	virtual bool initialize(IMsgHandlerInitData* data)  = 0;
20
21	//
22	//	Do handling the incoming message
23	virtual bool handleMsg(IMsg* pMsg) = 0;
24
25	//
26	//	manage sub message handler
27	//
28	virtual void addSubHandler(int nMsgCate, int nMsgID, IMsgHandler* pHandler)		= 0;
29	virtual void rmvSubHandler(int nMsgCate, int nMsgID)							= 0;
30};
31
32
33
34
35#endif