PageRenderTime 20ms CodeModel.GetById 11ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/TGame/TServerGate/Message/MsgBuildlerForGate.h

http://awoe.googlecode.com/
C++ Header | 32 lines | 11 code | 8 blank | 13 comment | 0 complexity | 72b32fe0b89dca04ddc3c7ee7d60193a MD5 | raw file
 1#ifndef ___MSG_BUILDER__FOR_GATE___
 2#define ___MSG_BUILDER__FOR_GATE___
 3
 4
 5#include "Message/MsgBuilderIf.h"
 6
 7//
 8//	A simple message builder with factory
 9//
10//
11class  MsgBuilderForGate : public IMsgBuilder, protected IMsgFactory
12{
13public:
14	//
15	//	serialize a message into a stream
16	//
17	virtual bool onEncodeMsg(IMsgRoute*  pMsgRoute, IMsg*	pMsg, MsgOStream& stream);
18
19	//	
20	//	de-serialize a message from stream
21	//
22	virtual bool onDecodeMsg(IMsgRoute*& pMsgRoute, IMsg*&	pMsg, MsgIStream& stream);
23
24	//
25	//	create a message base on message category and message id
26	//
27	IMsg*	createMsg(int nMsgCate, int nMsgID);
28};
29
30
31#endif
32