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  [[nodiscard]] std::string_view optionHelp() const override;
18 
19  void parseFileType(const std::string& arg,
20  span<std::string>& cmdLine) override;
21  [[nodiscard]] std::string_view fileTypeHelp() const override;
22  [[nodiscard]] 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 private:
29  CommandLineParser& cmdLineParser;
30 
31  struct IpsOption final : CLIOption {
32  void parseOption(const std::string& option,
33  span<std::string>& cmdLine) override;
34  [[nodiscard]] std::string_view optionHelp() const override;
35  } ipsOption;
36  struct RomTypeOption final : CLIOption {
37  void parseOption(const std::string& option,
38  span<std::string>& cmdLine) override;
39  [[nodiscard]] std::string_view optionHelp() const override;
40  } romTypeOption;
41 };
42 
43 } // namespace openmsx
44 
45 #endif
void parseFileType(const std::string &arg, span< std::string > &cmdLine) override
Definition: MSXRomCLI.cc:43
std::string_view fileTypeCategoryName() const override
Definition: MSXRomCLI.cc:53
void parseOption(const std::string &option, span< std::string > &cmdLine) override
Definition: MSXRomCLI.cc:26
std::string_view fileTypeHelp() const override
Definition: MSXRomCLI.cc:48
std::string_view optionHelp() const override
Definition: MSXRomCLI.cc:38
MSXRomCLI(CommandLineParser &cmdLineParser)
Definition: MSXRomCLI.cc:13
Definition: span.hh:126
This file implemented 3 utility functions:
Definition: Autofire.cc:9