wavelength 1.0.0
Loading...
Searching...
No Matches
lobbyconnectionlostmsg.h
Go to the documentation of this file.
1#pragma once
2
3#include "msg/message.h"
5#include "os/mem.h"
6
15public:
22 ~LobbyConnectionLostMsg() override = default;
23
30 void *operator new(size_t nSize) {
31 return PoolMemAlloc(static_cast<int>(nSize), "LobbyConnectionLostMsg", 0);
32 }
33
39 void operator delete(void *pBlock) {
40 PoolMemFree(pBlock);
41 }
42
44 static constexpr int kInternetDown = -91;
45
53 explicit LobbyConnectionLostMsg(int nError) : mError(nError) {
54 }
55
63 Message *Clone() override;
64
72 int Type() override;
73
81 const char *GetName() const override;
82
84 int GetError() const {
85 return mError;
86 }
87
88private:
89 int mError;
90};
Message * Clone() override
Produce a heap copy of this message.
LobbyConnectionLostMsg(int nError)
Construct a message.
Definition lobbyconnectionlostmsg.h:53
static constexpr int kInternetDown
The error code of a connection to the internet that went down.
Definition lobbyconnectionlostmsg.h:44
const char * GetName() const override
Report this message's class name.
int Type() override
Report this message's registered identity.
int GetError() const
Definition lobbyconnectionlostmsg.h:84
~LobbyConnectionLostMsg() override=default
Destroy the object.
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
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.