⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mmsgroutingmodifydataobject.h

📁 游戏《家园》源码
💻 H
字号:
#if !defined(MMsgRoutingModifyDataObject_H)
#define MMsgRoutingModifyDataObject_H

// MMsgRoutingModifyDataObject.h

#include "MMsgRoutingBaseDataObject.h"

namespace WONMsg {

//
// MMsgRoutingModifyDataObject
//
class MMsgRoutingModifyDataObject : public MMsgRoutingBaseDataObject {
public:
    // Default ctor
    MMsgRoutingModifyDataObject(void);

    // RoutingServerMessage ctor
    explicit MMsgRoutingModifyDataObject(const RoutingServerMessage& theMsgR);

    // Copy ctor
    MMsgRoutingModifyDataObject(const MMsgRoutingModifyDataObject& theMsgR);

    // Destructor
    virtual ~MMsgRoutingModifyDataObject(void);

    // Assignment
    MMsgRoutingModifyDataObject& operator=(const MMsgRoutingModifyDataObject& theMsgR);

    // Virtual Duplicate from RoutingServerMessage
    virtual TRawMsg* Duplicate(void) const;

	// Debug output
	virtual void Dump(std::ostream& os) const;

    // Pack and Unpack the message
    // Unpack will throw a BadMsgException is message is not of this type
    virtual void* Pack(void); 
    virtual void  Unpack(void);

    // Member access
	unsigned short GetOffset() const                             { return mOffset; }
	bool IsInsert() const                                        { return mIsInsert; }
	const WONCommon::RawBuffer& GetData() const                  { return mData; }

	void SetOffset(unsigned short theOffset)                     { mOffset = theOffset; }
	void SetIsInsert(bool isInsert)                              { mIsInsert = isInsert; }
	void SetData(const WONCommon::RawBuffer& theDataR)           { mData = theDataR; }
	void AppendToData(const WONCommon::RawBuffer& theAppendandR) { mData += theAppendandR; }
private:
	unsigned short       mOffset;
	bool                 mIsInsert;
	WONCommon::RawBuffer mData;
};

// Inlines
inline TRawMsg* MMsgRoutingModifyDataObject::Duplicate(void) const
    { return new MMsgRoutingModifyDataObject(*this); }

};  // Namespace WONMsg

#endif // MMsgRoutingModifyDataObject_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -