| e8555c89 Andy McCall |
1 |
#ifndef DISKIMAGEMANAGER_HH |
| 2 |
#define DISKIMAGEMANAGER_HH |
| 3 |
|
| 4 |
#include "CLIOption.hh" |
| 5 |
|
| 6 |
#include "zstring_view.hh" |
| 7 |
|
| 8 |
#include <span> |
| 9 |
|
| 10 |
namespace openmsx { |
| 11 |
|
| 12 |
class CommandLineParser; |
| 13 |
|
| 14 |
class DiskImageCLI final : public CLIOption, public CLIFileType |
| 15 |
{ |
| 16 |
public: |
| 17 |
static std::span<const std::string_view> getExtensions(); |
| 18 |
|
| 19 |
public: |
| 20 |
explicit DiskImageCLI(CommandLineParser& parser); |
| 21 |
void parseOption(const std::string& option, |
| 22 |
std::span<std::string>& cmdLine) override; |
| 23 |
[[nodiscard]] std::string_view optionHelp() const override; |
| 24 |
void parseFileType(const std::string& filename, |
| 25 |
std::span<std::string>& cmdLine) override; |
| 26 |
[[nodiscard]] std::string_view fileTypeHelp() const override; |
| 27 |
[[nodiscard]] std::string_view fileTypeCategoryName() const override; |
| 28 |
|
| 29 |
private: |
| 30 |
void parse(zstring_view drive, std::string_view image, |
| 31 |
std::span<std::string>& cmdLine) const; |
| 32 |
|
| 33 |
private: |
| 34 |
CommandLineParser& parser; |
| 35 |
char driveLetter = 'a'; |
| 36 |
}; |
| 37 |
|
| 38 |
} |
| 39 |
|
| 40 |
#endif |