50 : mResult(nResult), mChatroom(chatroom) {
59 void *
operator new(
size_t nSize) {
60 return PoolMemAlloc(
static_cast<int>(nSize),
"JoinChatroomResultMsg", 0);
68 void operator delete(
void *pBlock) {
96 return "JoinChatroomResultMsg";
int Type() override
Report this message's registered identity.
Definition joinchatroomresultmsg.h:86
Result
Values of mResult.
Definition joinchatroomresultmsg.h:24
@ kResultNameExists
Definition joinchatroomresultmsg.h:27
@ kResultFailed
Definition joinchatroomresultmsg.h:26
@ kResultVulgarName
Definition joinchatroomresultmsg.h:25
@ kResultSuccess
Definition joinchatroomresultmsg.h:28
JoinChatroomResultMsg(int nResult, const NetChatroomInfo &chatroom)
Construct a result with the room joined.
Definition joinchatroomresultmsg.h:49
int GetResult() const
Definition joinchatroomresultmsg.h:114
Message * Clone() override
Produce a heap copy of this message.
Definition joinchatroomresultmsg.h:77
const NetChatroomInfo & GetChatroom() const
Definition joinchatroomresultmsg.h:109
void PrintExtra(PrnStream &stream) const override
Write the result, and the room after a success.
const char * GetName() const override
Report this message's class name.
Definition joinchatroomresultmsg.h:95
JoinChatroomResultMsg(int nResult)
Construct a failure, whose room has the identifier -1.
Definition joinchatroomresultmsg.h:38
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
Text output stream.
Definition prnstream.h:16
int g_nJoinChatroomResultMsgType
Identity that JoinChatroomResultMsg::Type() reports.
void * PoolMemAlloc(int nSize, const char *pszTag, int nAlign)
Allocate a block from the pool heaps and bill it to a tag.
void PoolMemFree(void *pBlock)
Return a block PoolMemAlloc() handed out to the pool heap that owns it.
The description of one chat room of the online lobby.
Definition netchatroominfo.h:11