31 PlayerRankMsg(
int nAccount,
int nRank) : mAccount(nAccount), mRank(nRank) {
40 void *
operator new(
size_t nSize) {
41 return PoolMemAlloc(
static_cast<int>(nSize),
"PlayerRankMsg", 0);
49 void operator delete(
void *pBlock) {
77 return "PlayerRankMsg";
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
Message * Clone() override
Produce a heap copy of this message.
Definition playerrankmsg.h:58
int GetRank() const
Definition playerrankmsg.h:95
PlayerRankMsg(int nAccount, int nRank)
Construct a message.
Definition playerrankmsg.h:31
const char * GetName() const override
Report this message's class name.
Definition playerrankmsg.h:76
int Type() override
Report this message's registered identity.
Definition playerrankmsg.h:67
void PrintExtra(PrnStream &stream) const override
Write the account and the rank.
int GetAccount() const
Definition playerrankmsg.h:90
~PlayerRankMsg() override=default
Destroy the object.
Text output stream.
Definition prnstream.h:16
int g_nPlayerRankMsgType
Identity that PlayerRankMsg::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.