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