wavelength 1.0.0
Loading...
Searching...
No Matches
inetconnectstatusmsg.h
Go to the documentation of this file.
1#pragma once
2
3#include "msg/message.h"
5#include "os/mem.h"
6#include "os/string.h"
7
15public:
23 explicit InetConnectStatusMsg(const String &status) : mStatus(status) {
24 }
25
32 void *operator new(size_t nSize) {
33 return PoolMemAlloc(static_cast<int>(nSize), "InetConnectStatusMsg", 0);
34 }
35
41 void operator delete(void *pBlock) {
42 PoolMemFree(pBlock);
43 }
44
50 Message *Clone() override {
51 return new InetConnectStatusMsg(*this);
52 }
53
59 int Type() override {
61 }
62
68 const char *GetName() const override {
69 return "InetConnectStatusMsg";
70 }
71
79 void PrintExtra(PrnStream &stream) const override;
80
82 const String &GetStatus() const {
83 return mStatus;
84 }
85
86private:
87 String mStatus;
88};
const String & GetStatus() const
Definition inetconnectstatusmsg.h:82
int Type() override
Report this message's registered identity.
Definition inetconnectstatusmsg.h:59
InetConnectStatusMsg(const String &status)
Construct a message.
Definition inetconnectstatusmsg.h:23
Message * Clone() override
Produce a heap copy of this message.
Definition inetconnectstatusmsg.h:50
const char * GetName() const override
Report this message's class name.
Definition inetconnectstatusmsg.h:68
void PrintExtra(PrnStream &stream) const override
Write the text of the step.
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
Text output stream.
Definition prnstream.h:16
Growable text buffer that is also a PrnStream.
Definition string.h:19
int g_nInetConnectStatusMsgType
Identity that InetConnectStatusMsg::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.