resonance 1.0.1
Loading...
Searching...
No Matches
testarbiterpacket.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:
34
45 TestArbiterPacket(const HxStr &sender, const HxStr &text);
46
57 static Message *New();
58
66 virtual Message *Clone();
67
75 virtual int Type();
76
84 virtual const char *GetName() const;
85
93 virtual void PrintExtra(std::ostream &stream) const;
94
102 virtual void saveGuts(OBStream &stream) const;
103
111 virtual void restoreGuts(IBStream &stream);
112
123
134
135private:
136 // Both titles follow GameChatPacket, whose layout and transfers this class repeats.
137 HxStr mSender; // +0x14
138 HxStr mText; // +0x1c
139};
140
150extern int g_nTestArbiterPacketType;
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
HxStr GetSender()
Report the first string.
static Message * New()
Produce a packet with two empty strings on the heap.
TestArbiterPacket(const HxStr &sender, const HxStr &text)
Construct a packet carrying two strings.
virtual void saveGuts(OBStream &stream) const
Write the Packet words and then both strings to a stream.
virtual Message * Clone()
Produce a heap copy of this packet.
virtual void restoreGuts(IBStream &stream)
Read the Packet words and then both strings back from a stream.
virtual const char * GetName() const
Report this packet's class name.
virtual int Type()
Report this packet's registered identity.
virtual void PrintExtra(std::ostream &stream) const
Write both strings to a diagnostic stream, with nothing between them.
HxStr GetText()
Report the second string.
TestArbiterPacket()
Construct a packet with two empty strings.
Definition testarbiterpacket.h:32
ToArbiterPacket()
Route the packet with the pair 0 and 1.
Definition toarbiterpacket.h:21
int g_nTestArbiterPacketType
Identity that TestArbiterPacket::Type() reports.