openMSX
MSXRomCLI.hh
Go to the documentation of this file.
1 #ifndef MSXROMCLI_HH
2 #define MSXROMCLI_HH
3 
4 #include "CLIOption.hh"
5 
6 namespace openmsx {
7 
8 class CommandLineParser;
9 
10 class MSXRomCLI final : public CLIOption, public CLIFileType
11 {
12 public:
13  explicit MSXRomCLI(CommandLineParser& cmdLineParser);
14 
15  void parseOption(const std::string& option,
16  span<std::string>& cmdLine) override;
17  std::string_view optionHelp() const override;
18 
19  void parseFileType(const std::string& arg,
20  span<std::string>& cmdLine) override;
21  std::string_view fileTypeHelp() const override;
22 
23 private:
24  void parse(const std::string& arg, const std::string& slotname,
25  span<std::string>& cmdLine);
26 
27  CommandLineParser& cmdLineParser;
28 
29  struct IpsOption final : CLIOption {
30  void parseOption(const std::string& option,
31  span<std::string>& cmdLine) override;
32  std::string_view optionHelp() const override;
33  } ipsOption;
34  struct RomTypeOption final : CLIOption {
35  void parseOption(const std::string& option,
36  span<std::string>& cmdLine) override;
37  std::string_view optionHelp() const override;
38  } romTypeOption;
39 };
40 
41 } // namespace openmsx
42 
43 #endif
openmsx::CLIOption
Definition: CLIOption.hh:9
openmsx::MSXRomCLI
Definition: MSXRomCLI.hh:10
openmsx::MSXRomCLI::fileTypeHelp
std::string_view fileTypeHelp() const override
Definition: MSXRomCLI.cc:47
openmsx::CLIFileType
Definition: CLIOption.hh:24
openmsx::MSXRomCLI::optionHelp
std::string_view optionHelp() const override
Definition: MSXRomCLI.cc:37
span
Definition: span.hh:34
openmsx::MSXRomCLI::parseOption
void parseOption(const std::string &option, span< std::string > &cmdLine) override
Definition: MSXRomCLI.cc:25
openmsx::MSXRomCLI::parseFileType
void parseFileType(const std::string &arg, span< std::string > &cmdLine) override
Definition: MSXRomCLI.cc:42
openmsx::CommandLineParser
Definition: CommandLineParser.hh:32
CLIOption.hh
openmsx
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
openmsx::MSXRomCLI::MSXRomCLI
MSXRomCLI(CommandLineParser &cmdLineParser)
Definition: MSXRomCLI.cc:12