wavelength 1.0.0
Loading...
Searching...
No Matches
lobbylaunchpadsmsg.h
Go to the documentation of this file.
1#pragma once
2
3#include <list>
4
5#include "msg/message.h"
8#include "os/mem.h"
9
17public:
26 LobbyLaunchpadsMsg(std::list<NetLaunchpadInfo> *pLaunchpads, int nHasPrevious)
27 : mLaunchpads(pLaunchpads), mHasPrevious(nHasPrevious) {
28 }
29
36 void *operator new(size_t nSize) {
37 return PoolMemAlloc(static_cast<int>(nSize), "LobbyLaunchpadsMsg", 0);
38 }
39
45 void operator delete(void *pBlock) {
46 PoolMemFree(pBlock);
47 }
48
54 Message *Clone() override {
55 return new LobbyLaunchpadsMsg(*this);
56 }
57
63 int Type() override {
65 }
66
72 const char *GetName() const override {
73 return "LobbyLaunchpadsMsg";
74 }
75
83 void PrintExtra(PrnStream &stream) const override;
84
86 int GetHasPrevious() const {
87 return mHasPrevious;
88 }
89
91 std::list<NetLaunchpadInfo> *GetLaunchpads() const {
92 return mLaunchpads;
93 }
94
95private:
96 std::list<NetLaunchpadInfo> *mLaunchpads;
97 int mHasPrevious;
98};
Message * Clone() override
Produce a heap copy of this message, which points at the same launchpads.
Definition lobbylaunchpadsmsg.h:54
LobbyLaunchpadsMsg(std::list< NetLaunchpadInfo > *pLaunchpads, int nHasPrevious)
Construct a message that points at the launchpads.
Definition lobbylaunchpadsmsg.h:26
int Type() override
Report this message's registered identity.
Definition lobbylaunchpadsmsg.h:63
const char * GetName() const override
Report this message's class name.
Definition lobbylaunchpadsmsg.h:72
void PrintExtra(PrnStream &stream) const override
Write the launchpads when the list exists.
std::list< NetLaunchpadInfo > * GetLaunchpads() const
Definition lobbylaunchpadsmsg.h:91
int GetHasPrevious() const
Definition lobbylaunchpadsmsg.h:86
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_nLobbyLaunchpadsMsgType
Identity that LobbyLaunchpadsMsg::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.