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  std::string_view fileTypeCategoryName() const override;
23 
24 private:
25  void parse(const std::string& arg, const std::string& slotname,
26  span<std::string>& cmdLine);
27 
28  CommandLineParser& cmdLineParser;
29 
30  struct IpsOption final : CLIOption {
31  void parseOption(const std::string& option,
32  span<std::string>& cmdLine) override;
33  std::string_view optionHelp() const override;
34  } ipsOption;
35  struct RomTypeOption final : CLIOption {
36  void parseOption(const std::string& option,
37  span<std::string>& cmdLine) override;
38  std::string_view optionHelp() const override;
39  } romTypeOption;
40 };
41 
42 } // namespace openmsx
43 
44 #endif
openmsx::CLIOption
Definition: CLIOption.hh:10
openmsx::MSXRomCLI
Definition: MSXRomCLI.hh:11
openmsx::MSXRomCLI::fileTypeHelp
std::string_view fileTypeHelp() const override
Definition: MSXRomCLI.cc:48
openmsx::CLIFileType
Definition: CLIOption.hh:25
openmsx::MSXRomCLI::optionHelp
std::string_view optionHelp() const override
Definition: MSXRomCLI.cc:38
span
Definition: span.hh:126
openmsx::MSXRomCLI::parseOption
void parseOption(const std::string &option, span< std::string > &cmdLine) override
Definition: MSXRomCLI.cc:26
openmsx::MSXRomCLI::parseFileType
void parseFileType(const std::string &arg, span< std::string > &cmdLine) override
Definition: MSXRomCLI.cc:43
openmsx::CommandLineParser
Definition: CommandLineParser.hh:35
CLIOption.hh
openmsx::MSXRomCLI::fileTypeCategoryName
std::string_view fileTypeCategoryName() const override
Definition: MSXRomCLI.cc:54
openmsx
This file implemented 3 utility functions:
Definition: Autofire.cc:5
openmsx::MSXRomCLI::MSXRomCLI
MSXRomCLI(CommandLineParser &cmdLineParser)
Definition: MSXRomCLI.cc:13