wavelength 1.0.0
Loading...
Searching...
No Matches
launchpadabortedmsg.h
Go to the documentation of this file.
1#pragma once
2
3#include "msg/message.h"
5#include "os/mem.h"
6
15public:
35
43 explicit LaunchpadAbortedMsg(int nReason) : mReason(nReason) {
44 }
45
52 void *operator new(size_t nSize) {
53 return PoolMemAlloc(static_cast<int>(nSize), "LaunchpadAbortedMsg", 0);
54 }
55
61 void operator delete(void *pBlock) {
62 PoolMemFree(pBlock);
63 }
64
70 Message *Clone() override {
71 return new LaunchpadAbortedMsg(*this);
72 }
73
79 int Type() override {
81 }
82
88 const char *GetName() const override {
89 return "LaunchpadAbortedMsg";
90 }
91
99 void PrintExtra(PrnStream &stream) const override;
100
102 int GetReason() const {
103 return mReason;
104 }
105
106private:
107 int mReason;
108};
void PrintExtra(PrnStream &stream) const override
Write the reason.
int Type() override
Report this message's registered identity.
Definition launchpadabortedmsg.h:79
Message * Clone() override
Produce a heap copy of this message.
Definition launchpadabortedmsg.h:70
LaunchpadAbortedMsg(int nReason)
Construct a message with a reason.
Definition launchpadabortedmsg.h:43
int GetReason() const
Definition launchpadabortedmsg.h:102
const char * GetName() const override
Report this message's class name.
Definition launchpadabortedmsg.h:88
Reason
Values of mReason.
Definition launchpadabortedmsg.h:17
@ kReasonServer
Definition launchpadabortedmsg.h:19
@ kReasonHost
Definition launchpadabortedmsg.h:30
@ kReasonIncompatibleHost
Definition launchpadabortedmsg.h:24
@ kReasonHostFailed
Definition launchpadabortedmsg.h:21
@ kReasonCreateFailed
Definition launchpadabortedmsg.h:23
@ kReasonLost
Definition launchpadabortedmsg.h:20
@ kReasonConnectFailed
Definition launchpadabortedmsg.h:22
@ kReasonBad
Definition launchpadabortedmsg.h:32
@ kReasonBoot
Definition launchpadabortedmsg.h:31
@ kReasonFull
Definition launchpadabortedmsg.h:25
@ kReasonIncompatible
Definition launchpadabortedmsg.h:28
@ kReasonInProgress
Definition launchpadabortedmsg.h:26
@ kReasonDenied
Definition launchpadabortedmsg.h:27
@ kReasonNone
Definition launchpadabortedmsg.h:33
@ kReasonDied
Definition launchpadabortedmsg.h:29
@ kReasonInit
Definition launchpadabortedmsg.h:18
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_nLaunchpadAbortedMsgType
Identity that LaunchpadAbortedMsg::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.