OXYGENHUB
◆ main openmsx / src / memory / MSXRomCLI.hh
1.4 KiB · C++ · last changed chore(): initial commit 1 month ago source blame history raw
e8555c89 Andy McCall 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
	static std::span<const std::string_view> getExtensions();
14
15
public:
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
27
private:
28
	void parse(const std::string& arg, const std::string& slotName,
29
	           std::span<std::string>& cmdLine) const;
30
31
private:
32
	CommandLineParser& cmdLineParser;
33
34
	struct IpsOption final : CLIOption {
35
		[[noreturn]] 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
		[[noreturn]] 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