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
openmsx::CommandController
Definition: CommandController.hh:17
openmsx::NowindHost::Drives
std::vector< std::unique_ptr< DiskContainer > > Drives
Definition: NowindHost.hh:20
openmsx::NowindCommand
Definition: NowindCommand.hh:15
openmsx::NowindCommand::NowindCommand
NowindCommand(const std::string &basename, CommandController &commandController, NowindInterface &interface)
Definition: NowindCommand.cc:24
openmsx::DiskChanger
DiskChanger
Definition: DiskChanger.cc:415
span
Definition: span.hh:34
openmsx::NowindCommand::help
std::string help(const std::vector< std::string > &tokens) const override
Print help for this command.
Definition: NowindCommand.cc:278
openmsx::MSXMotherBoard
Definition: MSXMotherBoard.hh:59
openmsx::NowindInterface
Definition: NowindInterface.hh:16
openmsx::NowindCommand::tabCompletion
void tabCompletion(std::vector< std::string > &tokens) const override
Attempt tab completion for this command.
Definition: NowindCommand.cc:330
openmsx::NowindCommand::createDiskChanger
std::unique_ptr< DiskChanger > createDiskChanger(const std::string &basename, unsigned n, MSXMotherBoard &motherBoard) const
Definition: NowindCommand.cc:32
Command.hh
openmsx::NowindInterface
NowindInterface
Definition: NowindInterface.cc:143
openmsx::Command
Definition: Command.hh:40
openmsx::TclObject
Definition: TclObject.hh:21
openmsx
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
openmsx::NowindCommand::execute
void execute(span< const TclObject > tokens, TclObject &result) override
Execute this command.
Definition: NowindCommand.cc:97
NowindHost.hh