wavelength 1.0.0
Loading...
Searching...
No Matches
loadgamemsg.h
Go to the documentation of this file.
1#pragma once
2
3#include "msg/message.h"
5#include "os/mem.h"
6
13class LoadGameMsg : public Message {
14public:
21 ~LoadGameMsg() override = default;
22
29 void *operator new(size_t nSize) {
30 return PoolMemAlloc(static_cast<int>(nSize), "LoadGameMsg", 0);
31 }
32
38 void operator delete(void *pBlock) {
39 PoolMemFree(pBlock);
40 }
41
49 Message *Clone() override {
50 return new LoadGameMsg(*this);
51 }
52
60 int Type() override {
61 return g_nLoadGameMsgType;
62 }
63
71 const char *GetName() const override {
72 return "LoadGameMsg";
73 }
74};
Message that tells the game to load the song of an online session.
Definition loadgamemsg.h:13
Message * Clone() override
Produce a heap copy of this message.
Definition loadgamemsg.h:49
const char * GetName() const override
Report this message's class name.
Definition loadgamemsg.h:71
~LoadGameMsg() override=default
Destroy the object.
int Type() override
Report this message's registered identity.
Definition loadgamemsg.h:60
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
int g_nLoadGameMsgType
Identity that LoadGameMsg::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.