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

📄 mmsgroutingsenddata.h

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

// MMsgRoutingSendData.h

#include "common/won.h"
#include "AddresseeList.h"

namespace WONMsg {

class MMsgRoutingSendData : public RoutingServerMessage, public AddresseeList {
public:
    // Default ctor
    MMsgRoutingSendData(void);

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

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

    // Destructor
    virtual ~MMsgRoutingSendData(void);

    // Assignment
    MMsgRoutingSendData& operator=(const MMsgRoutingSendData& 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
	bool ShouldSendReply() const                                 { return mShouldSendReply; }
	const WONCommon::RawBuffer& GetData() const                  { return mData; }

	void SetShouldSendReply(bool shouldSendReply)                { mShouldSendReply = shouldSendReply; }
	void SetData(const WONCommon::RawBuffer& theDataR)           { mData = theDataR; }
	void AppendToData(const WONCommon::RawBuffer& theAppendandR) { mData += theAppendandR; }
protected:
	bool                 mShouldSendReply;
	WONCommon::RawBuffer mData;
};


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

};  // Namespace WONMsg

#endif // MMsgRoutingSendData_H

⌨️ 快捷键说明

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