openMSX
NowindCommand.hh
Go to the documentation of this file.
1 #ifndef NOWINDCOMMAND_HH
2 #define NOWINDCOMMAND_HH
3 
4 #include "NowindHost.hh"
5 #include "Command.hh"
6 #include <memory>
7 #include <string_view>
8 
9 namespace openmsx {
10 
11 class NowindInterface;
12 class DiskChanger;
13 class MSXMotherBoard;
14 
15 class NowindCommand final : public Command
16 {
17 public:
18  NowindCommand(const std::string& basename,
19  CommandController& commandController,
20  NowindInterface& interface);
21  void execute(span<const TclObject> tokens, TclObject& result) override;
22  std::string help(const std::vector<std::string>& tokens) const override;
23  void tabCompletion(std::vector<std::string>& tokens) const override;
24 
25  std::unique_ptr<DiskChanger> createDiskChanger(
26  const std::string& basename, unsigned n,
27  MSXMotherBoard& motherBoard) const;
28 
29 private:
30  unsigned searchRomdisk(const NowindHost::Drives& drives) const;
31  void processHdimage(std::string_view hdimage,
32  NowindHost::Drives& drives) const;
33  NowindInterface& interface;
34 };
35 
36 } // namespace openmsx
37 
38 #endif
NowindCommand(const std::string &basename, CommandController &commandController, NowindInterface &interface)
Definition: span.hh:34
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
void execute(span< const TclObject > tokens, TclObject &result) override
Execute this command.
void tabCompletion(std::vector< std::string > &tokens) const override
Attempt tab completion for this command.
std::vector< std::unique_ptr< DiskContainer > > Drives
Definition: NowindHost.hh:20
std::string help(const std::vector< std::string > &tokens) const override
Print help for this command.
std::unique_ptr< DiskChanger > createDiskChanger(const std::string &basename, unsigned n, MSXMotherBoard &motherBoard) const