wavelength 1.0.0
Loading...
Searching...
No Matches
remixdownloadmsg.h
Go to the documentation of this file.
1#pragma once
2
3#include "msg/message.h"
5#include "os/mem.h"
6
14class RemixDownloadMsg : public Message {
15public:
22 ~RemixDownloadMsg() override = default;
23
33 RemixDownloadMsg(int nResult, const char *pszName, const char *pszNote)
34 : mResult(nResult), mName(pszName), mNote(pszNote) {
35 }
36
43 void *operator new(size_t nSize) {
44 return PoolMemAlloc(static_cast<int>(nSize), "RemixDownloadMsg", 0);
45 }
46
52 void operator delete(void *pBlock) {
53 PoolMemFree(pBlock);
54 }
55
63 Message *Clone() override {
64 return new RemixDownloadMsg(*this);
65 }
66
74 int Type() override {
76 }
77
85 const char *GetName() const override {
86 return "RemixDownloadMsg";
87 }
88
90 const char *GetNote() const {
91 return mNote;
92 }
93
95 int GetResult() const {
96 return mResult;
97 }
98
99private:
100 int mResult;
101 const char *mName;
102 const char *mNote;
103};
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, which points at the same texts.
Definition remixdownloadmsg.h:63
~RemixDownloadMsg() override=default
Destroy the object.
const char * GetName() const override
Report this message's class name.
Definition remixdownloadmsg.h:85
int Type() override
Report this message's registered identity.
Definition remixdownloadmsg.h:74
int GetResult() const
Definition remixdownloadmsg.h:95
RemixDownloadMsg(int nResult, const char *pszName, const char *pszNote)
Construct a message.
Definition remixdownloadmsg.h:33
const char * GetNote() const
Definition remixdownloadmsg.h:90
int g_nRemixDownloadMsgType
Identity that RemixDownloadMsg::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.