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

/TGame/TCommon/Message/MsgBase.cpp

http://awoe.googlecode.com/
C++ | 73 lines | 60 code | 13 blank | 0 comment | 0 complexity | 84e6b7ad822552efefcfa153a2353750 MD5 | raw file
 1#include "stdafx.h"
 2#include "MsgBase.h"
 3
 4using namespace woe;
 5
 6MsgBase::MsgBase(char nCate, short nID)
 7:m_nCate(nCate), m_nID(nID),m_nSessionID(0)
 8{
 9	;
10}
11
12void
13MsgBase::setMsgID(short nID)
14{
15	m_nID = nID;
16}
17
18short
19MsgBase::getMsgID()const
20{
21	return m_nID;
22}
23
24void
25MsgBase::setMsgCate(char nID)
26{
27	m_nCate = nID;
28}
29
30char
31MsgBase::getMsgCate()const
32{
33	return m_nCate;
34}
35
36void
37MsgBase::setSID(int nPID)
38{
39	m_nSessionID = nPID;
40}
41
42int
43MsgBase::getSID()const
44{
45	return m_nSessionID;
46}
47
48bool
49MsgBase::decode(MsgIStream& stream)
50{
51	LOG_DEBUG("Fuck, Please don't call me! MsgBase::decode");
52	return false;
53}
54
55bool
56MsgBase::encode(MsgOStream& stream)
57{
58	LOG_DEBUG("Fuck, Please don't call me! MsgBase::encode");
59	return false;
60}
61
62void
63MsgBase::dump()
64{
65	LOG_DEBUG_V("Msg[%d, %d][SID:%d]", m_nCate, m_nID, m_nSessionID);
66}
67
68bool
69MsgBase::validate()
70{
71	return true;
72}
73