resonance 1.0.1
Loading...
Searching...
No Matches
gameconnectionlostmsg.h
Go to the documentation of this file.
1#pragma once
2
3#include <iostream>
4
5#include "msg/message.h"
6#include "os/hxstr.h"
7
20public:
29
40
50 static Message *New();
51
59 virtual Message *Clone();
60
68 virtual int Type();
69
77 virtual const char *GetName() const;
78
89 virtual void PrintExtra(std::ostream &stream) const;
90
91private:
92 HxStr mReason; // +0x04, the text PrintExtra() writes, with a title after the loss it reports
93};
94
static Message * New()
Produce a message with an empty string on the heap.
GameConnectionLostMsg(const HxStr &reason)
Construct a message carrying a copy of a string.
virtual void PrintExtra(std::ostream &stream) const
Write the string to a diagnostic stream.
virtual Message * Clone()
Produce a heap copy of this message.
virtual const char * GetName() const
Report this message's class name.
virtual int Type()
Report this message's registered identity.
GameConnectionLostMsg()
Construct a message with an empty string.
Definition gameconnectionlostmsg.h:27
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:41
int g_nGameConnectionLostMsgType
Identity that GameConnectionLostMsg::Type() reports.