resonance 1.0.1
Loading...
Searching...
No Matches
stopriffmsg.h
Go to the documentation of this file.
1#pragma once
2
3#include <iostream>
4
5#include "mid/tick.h"
6#include "msg/message.h"
7
8class Player;
9
27class StopRiffMsg : public Message {
28public:
35 static int sID;
36
44 }
45
58 StopRiffMsg(int nButton, Player *pPlayer, Sch::Tick position, int nTrack)
59 : mButton(nButton), mPlayer(pPlayer), mPosition(position), mTrack(nTrack) {
60 }
61
72 static Message *New();
73
81 virtual Message *Clone();
82
90 virtual int Type();
91
99 virtual const char *GetName() const;
100
109 virtual void PrintExtra(std::ostream &stream) const;
110
114 int mTrack;
115};
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:41
One participant in a session, local or remote.
Definition player.h:39
Song position in MIDI ticks, printed as measure, beat, and tick.
Definition tick.h:70
virtual const char * GetName() const
Report this message's class name.
Player * mPlayer
Definition stopriffmsg.h:112
int mTrack
Definition stopriffmsg.h:114
Sch::Tick mPosition
Definition stopriffmsg.h:113
static Message * New()
Produce a default-constructed message on the heap.
static int sID
Identity that Type() reports.
Definition stopriffmsg.h:35
StopRiffMsg()
Construct a message with the position at kTickInfinity and the rest unset.
Definition stopriffmsg.h:43
virtual Message * Clone()
Produce a heap copy of this message.
StopRiffMsg(int nButton, Player *pPlayer, Sch::Tick position, int nTrack)
Report the end of a riff.
Definition stopriffmsg.h:58
virtual void PrintExtra(std::ostream &stream) const
Write the position, a space, the player's colour name, b#, and the word at +0x04 to a diagnostic str...
int mButton
Definition stopriffmsg.h:111
virtual int Type()
Report this message's registered identity.