/TGame/TServerGate/Message/MsgInRawStream.h

http://awoe.googlecode.com/ · C Header · 40 lines · 19 code · 9 blank · 12 comment · 0 complexity · 18f3b6efa65b1076e859d065df95089c MD5 · raw file

  1. #ifndef ___MSG_IMP_RAW_STREAM___
  2. #define ___MSG_IMP_RAW_STREAM___
  3. #include "Message/MsgIf.h"
  4. class MsgInRawStream : public IMsg
  5. {
  6. public:
  7. MsgInRawStream();
  8. virtual void setMsgID(int nID);
  9. virtual int getMsgID();
  10. virtual void setMsgCate(int nCate);
  11. virtual int getMsgCate();
  12. //
  13. // decode a message from a stream
  14. //
  15. virtual bool decode(MsgIStream& stream);
  16. //
  17. // encode a message into a stream
  18. //
  19. virtual bool encode(MsgOStream& stream);
  20. //
  21. // dump the message information to log
  22. //
  23. virtual void dump();
  24. //
  25. // check validation of message
  26. //
  27. virtual bool validate();
  28. private:
  29. MsgBufferPtr m_theRawBuffer;
  30. };
  31. #endif