wavelength 1.0.0
Loading...
Searching...
No Matches
joinlaunchpadsuccessmsg.h
Go to the documentation of this file.
1#pragma once
2
3#include "msg/message.h"
6#include "os/mem.h"
7
15
23public:
33 : mParams(params), mPlayer(player) {
34 }
35
42 void *operator new(size_t nSize) {
43 return PoolMemAlloc(static_cast<int>(nSize), "JoinLaunchpadSuccessMsg", 0);
44 }
45
51 void operator delete(void *pBlock) {
52 PoolMemFree(pBlock);
53 }
54
60 Message *Clone() override {
61 return new JoinLaunchpadSuccessMsg(*this);
62 }
63
69 int Type() override {
71 }
72
78 const char *GetName() const override {
79 return "JoinLaunchpadSuccessMsg";
80 }
81
89 void PrintExtra(PrnStream &stream) const override;
90
92 const NetGameParams &GetParams() const {
93 return mParams;
94 }
95
96private:
97 NetGameParams mParams;
98 NetLaunchpadPlayer mPlayer;
99};
const NetGameParams & GetParams() const
Definition joinlaunchpadsuccessmsg.h:92
void PrintExtra(PrnStream &stream) const override
Write the settings and the player of this console.
Message * Clone() override
Produce a heap copy of this message.
Definition joinlaunchpadsuccessmsg.h:60
const char * GetName() const override
Report this message's class name.
Definition joinlaunchpadsuccessmsg.h:78
int Type() override
Report this message's registered identity.
Definition joinlaunchpadsuccessmsg.h:69
JoinLaunchpadSuccessMsg(const NetGameParams &params, const NetLaunchpadPlayer &player)
Construct a message with the settings and the player.
Definition joinlaunchpadsuccessmsg.h:32
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
The settings of an online game that the host publishes with its session.
Definition netgameparams.h:13
Text output stream.
Definition prnstream.h:16
int g_nJoinLaunchpadSuccessMsgType
Identity that JoinLaunchpadSuccessMsg::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.
The description of one player of the online session this console is in.
Definition netlaunchpadplayer.h:13