openMSX
HDCommand.hh
Go to the documentation of this file.
1 #ifndef HDCOMMAND_HH
2 #define HDCOMMAND_HH
3 
4 #include "RecordedCommand.hh"
5 #include <string>
6 #include <vector>
7 
8 namespace openmsx {
9 
10 class CommandController;
11 class StateChangeDistributor;
12 class Scheduler;
13 class TclObject;
14 class HD;
15 class BooleanSetting;
16 
17 class HDCommand final : public RecordedCommand
18 {
19 public:
20  HDCommand(CommandController& commandController,
21  StateChangeDistributor& stateChangeDistributor,
22  Scheduler& scheduler, HD& hd, BooleanSetting& powerSetting);
23  void execute(span<const TclObject> tokens,
24  TclObject& result, EmuTime::param time) override;
25  [[nodiscard]] std::string help(const std::vector<std::string>& tokens) const override;
26  void tabCompletion(std::vector<std::string>& tokens) const override;
27  [[nodiscard]] bool needRecord(span<const TclObject> tokens) const override;
28 private:
29  HD& hd;
30  const BooleanSetting& powerSetting;
31 };
32 
33 } // namespace openmsx
34 
35 #endif
void tabCompletion(std::vector< std::string > &tokens) const override
Attempt tab completion for this command.
Definition: HDCommand.cc:75
void execute(span< const TclObject > tokens, TclObject &result, EmuTime::param time) override
This is like the execute() method of the Command class, it only has an extra time parameter.
Definition: HDCommand.cc:27
bool needRecord(span< const TclObject > tokens) const override
It's possible that in some cases the command doesn't need to be recorded after all (e....
Definition: HDCommand.cc:84
std::string help(const std::vector< std::string > &tokens) const override
Print help for this command.
Definition: HDCommand.cc:70
HDCommand(CommandController &commandController, StateChangeDistributor &stateChangeDistributor, Scheduler &scheduler, HD &hd, BooleanSetting &powerSetting)
Definition: HDCommand.cc:16
Commands that directly influence the MSX state should send and events so that they can be recorded by...
Definition: span.hh:126
This file implemented 3 utility functions:
Definition: Autofire.cc:5
HD
Definition: HD.cc:286