www.gusucode.com > 自己编的SQL服务端加客户端C++源码程序 > 自己编的SQL服务端加客户端/minisql/sql/Client/Msg.cpp
// Msg.cpp : implementation file // #include "stdafx.h" #include "Client.h" #include "Msg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CMsg IMPLEMENT_DYNCREATE(CMsg, CObject) CMsg::CMsg() { Init(); } CMsg::~CMsg() { } ///////////////////////////////////////////////////////////////////////////// // CMsg diagnostics #ifdef _DEBUG void CMsg::AssertValid() const { CObject::AssertValid(); } void CMsg::Dump(CDumpContext& dc) const { CObject::Dump(dc); } #endif //_DEBUG ///////////////////////////////////////////////////////////////////////////// // CMsg message handlers void CMsg::Init() { m_cmdID = CONTINUED; m_nCount = -1; m_bClose = FALSE; m_msgList.RemoveAll(); } void CMsg::Serialize( CArchive& ar ) { if( ar.IsStoring() ) { ar << m_cmdID; ar << m_nCount; ar << (WORD)m_bClose; } else { ar >> m_cmdID; ar >> m_nCount; WORD wd; ar >> wd; m_bClose = (BOOL)wd; } m_msgList.Serialize(ar); }