1#ifndef RECORDEDCOMMAND_HH
2#define RECORDEDCOMMAND_HH
13class CommandController;
14class StateChangeDistributor;
25 MSXCommandEvent(EmuTime::param time, std::span<const TclObject> tokens);
26 [[nodiscard]]
const auto&
getTokens()
const {
return tokens; }
28 template<
typename Archive>
29 void serialize(Archive& ar,
unsigned version);
52 std::span<const TclObject> tokens,
TclObject& result,
53 EmuTime::param time) = 0;
60 [[nodiscard]]
virtual bool needRecord(std::span<const TclObject> tokens)
const;
66 std::string_view name);
74 void signalStateChange(
const StateChange& event)
override;
75 void stopReplay(EmuTime::param time)
noexcept override;
This class is used to for Tcl commands that directly influence the MSX state (e.g.
void serialize(Archive &ar, unsigned version)
MSXCommandEvent()=default
const auto & getTokens() const
Commands that directly influence the MSX state should send and events so that they can be recorded by...
virtual bool needRecord(std::span< const TclObject > tokens) const
It's possible that in some cases the command doesn't need to be recorded after all (e....
virtual void execute(std::span< const TclObject > tokens, TclObject &result, EmuTime::param time)=0
This is like the execute() method of the Command class, it only has an extra time parameter.
Base class for all external MSX state changing events.
This file implemented 3 utility functions: