resonance 1.0.1
Loading...
Searching...
No Matches
TestArbiterPacket Class Reference

Network packet the game sends between game systems. More...

#include <testarbiterpacket.h>

Inheritance diagram for TestArbiterPacket:
Collaboration diagram for TestArbiterPacket:

Public Member Functions

 TestArbiterPacket ()
 Construct a packet with two empty strings.
 TestArbiterPacket (const HxStr &sender, const HxStr &text)
 Construct a packet carrying two strings.
virtual Message * Clone ()
 Produce a heap copy of this packet.
virtual int Type ()
 Report this packet's registered identity.
virtual const char * GetName () const
 Report this packet's class name.
virtual void PrintExtra (std::ostream &stream) const
 Write both strings to a diagnostic stream, with nothing between them.
virtual void saveGuts (OBStream &stream) const
 Write the Packet words and then both strings to a stream.
virtual void restoreGuts (IBStream &stream)
 Read the Packet words and then both strings back from a stream.
HxStr GetSender ()
 Report the first string.
HxStr GetText ()
 Report the second string.
Public Member Functions inherited from ToArbiterPacket
 ToArbiterPacket ()
 Route the packet with the pair 0 and 1.
Public Member Functions inherited from Message
void * operator new (size_t nSize)
 Allocate a message from the tagged heap under the tag MSG.
void operator delete (void *pBlock)
 Release a message to the tagged heap under the tag MSG.
virtual ~Message ()
 Vtable slot 1.
std::ostream & Print (std::ostream &stream) const
 Write this message to a diagnostic stream as {GetName() PrintExtra()}.

Static Public Member Functions

static Message * New ()
 Produce a packet with two empty strings on the heap.
Static Public Member Functions inherited from Message
static Message * NewMessage (int nType)
 Produce a message of the identified class through the factory list.

Additional Inherited Members

Protected Member Functions inherited from Packet
 Packet (int nDestination, int nDestinationSystem)
 Set the two routing words and mark the remaining two as unset.
Protected Attributes inherited from Packet
int mDestination
int mDestinationSystem
int mClientId
 The client the packet concerns, or -1 until set.
int mTargetClientId
 A second client identifier, -1 until set.

Detailed Description

Network packet the game sends between game systems.

Its RTTI descriptor is at 0x00902070. It has ToArbiterPacket as its one base. The object is 0x24 bytes and its vtable is at 0x008142f0. The payload comes from the copy constructor at 0x003f3e58. Clone() delegates to it, and the payload accounts for the allocation exactly. The four words Packet provides are declared there rather than here.

The layout matches GameChatPacket's, and saveGuts() and restoreGuts() here are byte-identical to the GameChatPacket routines. Slots 6 and 7 of this class's table address them. They are therefore this class's members.

The destructor at 0x003f1b40 is compiler-generated and has no declaration here.

Constructor & Destructor Documentation

◆ TestArbiterPacket() [1/2]

TestArbiterPacket::TestArbiterPacket ( )
inline

Construct a packet with two empty strings.

Inline, with no address of its own. New() expands it.

◆ TestArbiterPacket() [2/2]

TestArbiterPacket::TestArbiterPacket ( const HxStr & sender,
const HxStr & text )

Construct a packet carrying two strings.

The image lists no caller. The title is inferred.

Parameters
senderThe string for mSender.
textThe string for mText.
Ghidra address:
NTSC-U/C: 0x003f1cd0
Ghidra address:
PAL: 0x0042a208

Member Function Documentation

◆ New()

Message * TestArbiterPacket::New ( )
static

Produce a packet with two empty strings on the heap.

The registry the translation unit at 0x003ed2e0 builds stores this address against g_nTestArbiterPacketType.

Returns
The packet.
Ghidra address:
NTSC-U/C: 0x003e54d8
Ghidra address:
PAL: 0x0041d778

◆ Clone()

virtual Message * TestArbiterPacket::Clone ( )
virtual

Produce a heap copy of this packet.

Returns
The copy.
Ghidra address:
NTSC-U/C: 0x003f1bf8
Ghidra address:
PAL: 0x0042a128

Implements Message.

◆ Type()

virtual int TestArbiterPacket::Type ( )
virtual

Report this packet's registered identity.

Returns
g_nTestArbiterPacketType.
Ghidra address:
NTSC-U/C: 0x003f1c70
Ghidra address:
PAL: 0x0042a1a0

Implements Message.

◆ GetName()

virtual const char * TestArbiterPacket::GetName ( ) const
virtual

Report this packet's class name.

Returns
The literal TestArbiterPacket.
Ghidra address:
NTSC-U/C: 0x003f1c80
Ghidra address:
PAL: 0x0042a1b0

Implements Message.

◆ PrintExtra()

virtual void TestArbiterPacket::PrintExtra ( std::ostream & stream) const
virtual

Write both strings to a diagnostic stream, with nothing between them.

Parameters
streamThe stream to write to.
Ghidra address:
NTSC-U/C: 0x003f2ab8
Ghidra address:
PAL: 0x0042b000

Reimplemented from Message.

◆ saveGuts()

virtual void TestArbiterPacket::saveGuts ( OBStream & stream) const
virtual

Write the Packet words and then both strings to a stream.

Parameters
streamThe stream to write to.
Ghidra address:
NTSC-U/C: 0x003e8720
Ghidra address:
PAL: 0x00420a00

Reimplemented from Packet.

◆ restoreGuts()

virtual void TestArbiterPacket::restoreGuts ( IBStream & stream)
virtual

Read the Packet words and then both strings back from a stream.

Parameters
streamThe stream to read from.
Ghidra address:
NTSC-U/C: 0x003e8890
Ghidra address:
PAL: 0x00420b70

Reimplemented from Packet.

◆ GetSender()

HxStr TestArbiterPacket::GetSender ( )

Report the first string.

The image lists no caller. The title is inferred.

Returns
A copy of mSender.
Ghidra address:
NTSC-U/C: 0x003f1d88
Ghidra address:
PAL: 0x0042a2d0

◆ GetText()

HxStr TestArbiterPacket::GetText ( )

Report the second string.

The image lists no caller. The title is inferred.

Returns
A copy of mText.
Ghidra address:
NTSC-U/C: 0x003f1db8
Ghidra address:
PAL: 0x0042a300

The documentation for this class was generated from the following file: