resonance 1.0.1
Loading...
Searching...
No Matches
phrasepacket.h
Go to the documentation of this file.
1#pragma once
2
3#include <iostream>
4
6
7class IBStream;
8class OBStream;
9class Phrase;
10
29public:
40 static Message *New();
41
49 virtual Message *Clone();
50
58 virtual int Type();
59
67 virtual const char *GetName() const;
68
77 virtual void PrintExtra(std::ostream &stream) const;
78
87 virtual void saveGuts(OBStream &stream) const;
88
98 virtual void restoreGuts(IBStream &stream);
99
105 unsigned int mTr;
106
113
119 int mB;
120};
121
130extern int g_nPhrasePacketType;
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
Network packet the game sends between game systems.
Definition phrasepacket.h:28
virtual Message * Clone()
Produce a heap copy of this packet.
Phrase * mPhrase
The phrase, or null to clear the step.
Definition phrasepacket.h:112
unsigned int mTr
The track, labelled tr by PrintExtra().
Definition phrasepacket.h:105
virtual void restoreGuts(IBStream &stream)
Read the fields back in the order saveGuts() wrote them.
virtual void saveGuts(OBStream &stream) const
Write the Packet words, the track, the bar, the phrase, and the Packet word at +0x0c again to a strea...
virtual void PrintExtra(std::ostream &stream) const
Write tr:, the track, b:, the bar, a space, and then the phrase, or [empty] without one,...
virtual int Type()
Report this packet's registered identity.
virtual const char * GetName() const
Report this packet's class name.
static Message * New()
Produce a default-constructed packet on the heap.
int mB
The phrase step, labelled b by PrintExtra().
Definition phrasepacket.h:119
One phrase of a track, with its gems, its player, and the messages and values scheduled across it.
Definition phrase.h:38
ToAllOtherGameSystemsPacket()
Route the packet with the pair 2 and 3.
Definition toallothergamesystemspacket.h:21
int g_nPhrasePacketType
Identity that PhrasePacket::Type() reports.