openMSX
MSXRomCLI.hh
Go to the documentation of this file.
1#ifndef MSXROMCLI_HH
2#define MSXROMCLI_HH
3
4#include "CLIOption.hh"
5
6namespace openmsx {
7
8class CommandLineParser;
9
10class MSXRomCLI final : public CLIOption, public CLIFileType
11{
12public:
13 static std::span<const std::string_view> getExtensions();
14
15public:
16 explicit MSXRomCLI(CommandLineParser& cmdLineParser);
17
18 void parseOption(const std::string& option,
19 std::span<std::string>& cmdLine) override;
20 [[nodiscard]] std::string_view optionHelp() const override;
21
22 void parseFileType(const std::string& arg,
23 std::span<std::string>& cmdLine) override;
24 [[nodiscard]] std::string_view fileTypeHelp() const override;
25 [[nodiscard]] std::string_view fileTypeCategoryName() const override;
26
27private:
28 void parse(const std::string& arg, const std::string& slotName,
29 std::span<std::string>& cmdLine) const;
30
31private:
32 CommandLineParser& cmdLineParser;
33
34 struct IpsOption final : CLIOption {
35 void parseOption(const std::string& option,
36 std::span<std::string>& cmdLine) override;
37 [[nodiscard]] std::string_view optionHelp() const override;
38 } ipsOption;
39 struct RomTypeOption final : CLIOption {
40 void parseOption(const std::string& option,
41 std::span<std::string>& cmdLine) override;
42 [[nodiscard]] std::string_view optionHelp() const override;
43 } romTypeOption;
44};
45
46} // namespace openmsx
47
48#endif
void parseFileType(const std::string &arg, std::span< std::string > &cmdLine) override
Definition MSXRomCLI.cc:52
std::string_view fileTypeCategoryName() const override
Definition MSXRomCLI.cc:62
std::string_view fileTypeHelp() const override
Definition MSXRomCLI.cc:57
std::string_view optionHelp() const override
Definition MSXRomCLI.cc:47
static std::span< const std::string_view > getExtensions()
Definition MSXRomCLI.cc:16
void parseOption(const std::string &option, std::span< std::string > &cmdLine) override
Definition MSXRomCLI.cc:35
This file implemented 3 utility functions:
Definition Autofire.cc:11