resonance 1.0.1
Loading...
Searching...
No Matches
spjoindenypacket.h
Go to the documentation of this file.
1#pragma once
2
3#include <iostream>
4
6#include "os/hxstr.h"
7
8class IBStream;
9class OBStream;
10
26public:
35
46 SPJoinDenyPacket(int nReasonCode, const HxStr &reason);
47
58 static Message *New();
59
67 virtual Message *Clone();
68
76 virtual int Type();
77
85 virtual const char *GetName() const;
86
94 virtual void PrintExtra(std::ostream &stream) const;
95
103 virtual void saveGuts(OBStream &stream) const;
104
112 virtual void restoreGuts(IBStream &stream);
113
114private:
115 // Both titles are inferred from the class name, a refusal of a join request.
116 int mReasonCode; // +0x14
117 HxStr mReason; // +0x18
118};
119
129extern int g_nSPJoinDenyPacketType;
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
Input half of the byte stream interface.
Definition ibstream.h:36
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:41
Output half of the byte stream interface.
Definition obstream.h:25
SPJoinDenyPacket(int nReasonCode, const HxStr &reason)
Construct a packet from a word and a string, which is copied.
virtual void restoreGuts(IBStream &stream)
Read the Packet words, the word, and the string back from a stream.
virtual int Type()
Report this packet's registered identity.
SPJoinDenyPacket()
Construct a packet with an empty string.
Definition spjoindenypacket.h:33
static Message * New()
Produce a packet with an empty string on the heap.
virtual void saveGuts(OBStream &stream) const
Write the Packet words, the word, and the string to a stream.
virtual Message * Clone()
Produce a heap copy of this packet.
virtual void PrintExtra(std::ostream &stream) const
Write the word as a number, a space, and the string to a diagnostic stream.
virtual const char * GetName() const
Report this packet's class name.
ToSingleNetManagerPacket()
Route the packet with the pair 1 and 0.
Definition tosinglenetmanagerpacket.h:21
int g_nSPJoinDenyPacketType
Identity that SPJoinDenyPacket::Type() reports.