📄 effectinfo.cpp
字号:
//////////////////////////////////////////////////////////////////////// // Filename : EffectInfo.cpp // Written By : elca@ewestsoft.com// Description : 捞棋飘 沥焊 府胶飘 糕滚 沥狼.// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// include files//////////////////////////////////////////////////////////////////////#include "EffectInfo.h"#include "SocketInputStream.h"#include "SocketOutputStream.h"//////////////////////////////////////////////////////////////////////// constructor//////////////////////////////////////////////////////////////////////EffectInfo::EffectInfo () throw (){ __BEGIN_TRY m_ListNum = 0; __END_CATCH} //////////////////////////////////////////////////////////////////////// destructor//////////////////////////////////////////////////////////////////////EffectInfo::~EffectInfo () throw (){ __BEGIN_TRY __END_CATCH}//////////////////////////////////////////////////////////////////////// 涝仿胶飘覆(滚欺)栏肺何磐 单捞鸥甫 佬绢辑 菩哦阑 檬扁拳茄促.//////////////////////////////////////////////////////////////////////void EffectInfo::read ( SocketInputStream & iStream ) throw ( ProtocolException , Error ){ __BEGIN_TRY // 弥利拳 累诀矫 角力 农扁甫 疙矫窍档废 茄促. iStream.read( m_ListNum ); WORD m_Value; for( int i = 0; i < m_ListNum * 2 ; i++ ) { iStream.read( m_Value ); m_EList.push_back(m_Value); } __END_CATCH} //////////////////////////////////////////////////////////////////////// 免仿胶飘覆(滚欺)栏肺 菩哦狼 官捞呈府 捞固瘤甫 焊辰促.//////////////////////////////////////////////////////////////////////void EffectInfo::write ( SocketOutputStream & oStream ) const throw ( ProtocolException , Error ){ __BEGIN_TRY // 弥利拳 累诀矫 角力 农扁甫 疙矫窍档废 茄促. oStream.write( m_ListNum ); for ( list<WORD>:: const_iterator itr = m_EList.begin(); itr!= m_EList.end(); itr++) { oStream.write(*itr); } __END_CATCH}////////////////////////////////////////////////////////////////////////// EffectInfo::addListElement()// // ( 函拳何困, 函拳荐摹 ) 狼 茄 悸阑 府胶飘俊 持扁 困茄 糕滚 窃荐. ////////////////////////////////////////////////////////////////////////void EffectInfo::addListElement( EffectID_t EffectID , WORD Value ) throw(){ __BEGIN_TRY // 函窍绰 巴捞 公均牢瘤 List俊 持绰促. m_EList.push_back( EffectID ); // 函窍绰 荐摹甫 List俊 持绰促. m_EList.push_back( Value ); // 函拳 悸狼 肮荐甫 窍唱 刘啊 矫挪促. m_ListNum++; __END_CATCH}////////////////////////////////////////////////////////////////////////// get packet's debug string////////////////////////////////////////////////////////////////////////string EffectInfo::toString () const throw (){ __BEGIN_TRY StringStream msg; msg << "EffectInfo( " << ",ListNum: " << (int)m_ListNum << " ListSet(" ; for ( list<WORD>::const_iterator itr = m_EList.begin(); itr!= m_EList.end() ; itr++ ) { msg << (int)(*itr) << ","; } msg << ")"; return msg.toString(); __END_CATCH}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -