/TGame/TCommon/Message/MsgBase.cpp
http://awoe.googlecode.com/ · C++ · 73 lines · 60 code · 13 blank · 0 comment · 0 complexity · 84e6b7ad822552efefcfa153a2353750 MD5 · raw file
- #include "stdafx.h"
- #include "MsgBase.h"
-
- using namespace woe;
-
- MsgBase::MsgBase(char nCate, short nID)
- :m_nCate(nCate), m_nID(nID),m_nSessionID(0)
- {
- ;
- }
-
- void
- MsgBase::setMsgID(short nID)
- {
- m_nID = nID;
- }
-
- short
- MsgBase::getMsgID()const
- {
- return m_nID;
- }
-
- void
- MsgBase::setMsgCate(char nID)
- {
- m_nCate = nID;
- }
-
- char
- MsgBase::getMsgCate()const
- {
- return m_nCate;
- }
-
- void
- MsgBase::setSID(int nPID)
- {
- m_nSessionID = nPID;
- }
-
- int
- MsgBase::getSID()const
- {
- return m_nSessionID;
- }
-
- bool
- MsgBase::decode(MsgIStream& stream)
- {
- LOG_DEBUG("Fuck, Please don't call me! MsgBase::decode");
- return false;
- }
-
- bool
- MsgBase::encode(MsgOStream& stream)
- {
- LOG_DEBUG("Fuck, Please don't call me! MsgBase::encode");
- return false;
- }
-
- void
- MsgBase::dump()
- {
- LOG_DEBUG_V("Msg[%d, %d][SID:%d]", m_nCate, m_nID, m_nSessionID);
- }
-
- bool
- MsgBase::validate()
- {
- return true;
- }