openMSX
DiskImageCLI.hh
Go to the documentation of this file.
1 #ifndef DISKIMAGEMANAGER_HH
2 #define DISKIMAGEMANAGER_HH
3 
4 #include "CLIOption.hh"
5 
6 namespace openmsx {
7 
8 class CommandLineParser;
9 
10 class DiskImageCLI final : public CLIOption, public CLIFileType
11 {
12 public:
13  explicit DiskImageCLI(CommandLineParser& parser);
14  void parseOption(const std::string& option,
15  span<std::string>& cmdLine) override;
16  std::string_view optionHelp() const override;
17  void parseFileType(const std::string& filename,
18  span<std::string>& cmdLine) override;
19  std::string_view fileTypeHelp() const override;
20  std::string_view fileTypeCategoryName() const override;
21 
22 private:
23  void parse(std::string_view drive, std::string_view image,
24  span<std::string>& cmdLine);
25 
26  CommandLineParser& parser;
27  char driveLetter;
28 };
29 
30 } // namespace openmsx
31 
32 #endif
openmsx::CLIOption
Definition: CLIOption.hh:10
openmsx::DiskImageCLI::parseOption
void parseOption(const std::string &option, span< std::string > &cmdLine) override
Definition: DiskImageCLI.cc:20
openmsx::CLIFileType
Definition: CLIOption.hh:25
openmsx::DiskImageCLI::optionHelp
std::string_view optionHelp() const override
Definition: DiskImageCLI.cc:25
span
Definition: span.hh:126
openmsx::DiskImageCLI::parseFileType
void parseFileType(const std::string &filename, span< std::string > &cmdLine) override
Definition: DiskImageCLI.cc:30
openmsx::filename
constexpr const char *const filename
Definition: FirmwareSwitch.cc:10
openmsx::CommandLineParser
Definition: CommandLineParser.hh:35
CLIOption.hh
openmsx::DiskImageCLI::fileTypeHelp
std::string_view fileTypeHelp() const override
Definition: DiskImageCLI.cc:36
openmsx::DiskImageCLI
Definition: DiskImageCLI.hh:11
openmsx::DiskImageCLI::fileTypeCategoryName
std::string_view fileTypeCategoryName() const override
Definition: DiskImageCLI.cc:41
openmsx::DiskImageCLI::DiskImageCLI
DiskImageCLI(CommandLineParser &parser)
Definition: DiskImageCLI.cc:11
openmsx
This file implemented 3 utility functions:
Definition: Autofire.cc:5