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

📄 tmsgcommstatusreply.h

📁 游戏《家园》源码
💻 H
字号:
#ifndef _TMsgCommStatusReply_H
#define _TMsgCommStatusReply_H

// TMsgCommStatusReply.h

// Common Generic Reply class.  Returns a status (short) value.


#include "STRING"
#include "msg/TMessage.h"
#include "msg/ServerStatus.h"

// Forwards from WONSocket
namespace WONMsg {

class TMsgCommStatusReply : public TMessage
{
public:
    // Default ctor
    TMsgCommStatusReply(void);

    // TMessage ctor - will throw if TMessage type is not of this type
    explicit TMsgCommStatusReply(const TMessage& theMsgR);

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

    // Destructor
    ~TMsgCommStatusReply(void);

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

    // Virtual Duplicate from TMessage
    TRawMsg* Duplicate(void) const;

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

    // Status access
    ServerStatus GetStatus(void) const;
    void         SetStatus(ServerStatus theStatus);

private:
    ServerStatus mStatus;  // Request status
};


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

inline ServerStatus
TMsgCommStatusReply::GetStatus(void) const
{ return mStatus; }

inline void
TMsgCommStatusReply::SetStatus(ServerStatus theStatus)
{ mStatus = theStatus; }


};  // Namespace WONMsg

#endif

⌨️ 快捷键说明

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