wavelength 1.0.0
Loading...
Searching...
No Matches
changepasswordresultmsg.h
Go to the documentation of this file.
1#pragma once
2
3#include "msg/message.h"
5#include "os/mem.h"
6
14public:
21 ~ChangePasswordResultMsg() override = default;
22
28
36 explicit ChangePasswordResultMsg(int nResult) : mResult(nResult) {
37 }
38
45 void *operator new(size_t nSize) {
46 return PoolMemAlloc(static_cast<int>(nSize), "ChangePasswordResultMsg", 0);
47 }
48
54 void operator delete(void *pBlock) {
55 PoolMemFree(pBlock);
56 }
57
63 Message *Clone() override {
64 return new ChangePasswordResultMsg(*this);
65 }
66
72 int Type() override {
74 }
75
81 const char *GetName() const override {
82 return "ChangePasswordResultMsg";
83 }
84
92 void PrintExtra(PrnStream &stream) const override;
93
95 int GetResult() const {
96 return mResult;
97 }
98
99private:
100 int mResult;
101};
void PrintExtra(PrnStream &stream) const override
Write the result.
int GetResult() const
Definition changepasswordresultmsg.h:95
Message * Clone() override
Produce a heap copy of this message.
Definition changepasswordresultmsg.h:63
ChangePasswordResultMsg(int nResult)
Construct a result.
Definition changepasswordresultmsg.h:36
Result
Values of mResult.
Definition changepasswordresultmsg.h:24
@ kResultUpdateFailed
Definition changepasswordresultmsg.h:25
@ kResultSuccess
Definition changepasswordresultmsg.h:26
const char * GetName() const override
Report this message's class name.
Definition changepasswordresultmsg.h:81
int Type() override
Report this message's registered identity.
Definition changepasswordresultmsg.h:72
~ChangePasswordResultMsg() override=default
Destroy the object.
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_nChangePasswordResultMsgType
Identity that ChangePasswordResultMsg::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.