📄 curequest.h
字号:
//--------------------------------------------------------------------------------// // Filename : CURequest.h // Written By : Reiot// //--------------------------------------------------------------------------------#ifndef __CU_REQUEST_H__#define __CU_REQUEST_H__// include files#include "Packet.h"#include "PacketFactory.h"#include "Resource.h"//--------------------------------------------------------------------------------//// class CURequest;//// // ////--------------------------------------------------------------------------------class CURequest : public Packet {public : // 涝仿胶飘覆(滚欺)栏肺何磐 单捞鸥甫 佬绢辑 菩哦阑 檬扁拳茄促. void read ( SocketInputStream & iStream ) throw ( ProtocolException , Error ); // 家南栏肺何磐 流立 单捞鸥甫 佬绢辑 菩哦阑 檬扁拳茄促. void read ( Socket * pSocket ) throw ( ProtocolException , Error ); // 免仿胶飘覆(滚欺)栏肺 菩哦狼 官捞呈府 捞固瘤甫 焊辰促. void write ( SocketOutputStream & oStream ) const throw ( ProtocolException , Error ); // execute packet's handler void execute ( Player * pPlayer ) throw ( ProtocolException , Error ); // get packet id PacketID_t getPacketID () const throw () { return PACKET_CU_REQUEST; } // get packet's body size PacketSize_t getPacketSize () const throw () { return m_Resource.getSize(); } // 烙矫 内靛寸. -_-; static PacketSize_t getPacketMaxSize () throw () { return Resource::getMaxSize(); } // get packet name string getPacketName () const throw () { return "CURequest"; } // get packet's debug string string toString () const throw ();public : // get/set resource const Resource & getResource () const throw () { return m_Resource; } void setResource ( const Resource & resource ) throw () { m_Resource = resource; }private : // resource Resource m_Resource; };//--------------------------------------------------------------------------------//// class CURequestFactory;//// Factory for CURequest////--------------------------------------------------------------------------------class CURequestFactory : public PacketFactory {public : // create packet Packet * createPacket () throw () { return new CURequest(); } // get packet name string getPacketName () const throw () { return "CURequest"; } // get packet id PacketID_t getPacketID () const throw () { return Packet::PACKET_CU_REQUEST; } // get packet's max body size PacketSize_t getPacketMaxSize () const throw () { return Resource::getMaxSize(); }};//--------------------------------------------------------------------------------//// class CURequestHandler;////--------------------------------------------------------------------------------class CURequestHandler {public : // execute packet's handler static void execute ( CURequest * pPacket , Player * pPlayer ) throw ( ProtocolException , Error );};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -