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#include "zstring_view.hh"
7
8#include <span>
9
10namespace openmsx {
11
12class CommandLineParser;
13
14class DiskImageCLI final : public CLIOption, public CLIFileType
15{
16public:
17 static std::span<const std::string_view> getExtensions();
18
19public:
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
29private:
30 void parse(zstring_view drive, std::string_view image,
31 std::span<std::string>& cmdLine) const;
32
33private:
34 CommandLineParser& parser;
35 char driveLetter = 'a';
36};
37
38} // namespace openmsx
39
40#endif
std::string image
Definition HDImageCLI.cc:16
void parseOption(const std::string &option, std::span< std::string > &cmdLine) override
static std::span< const std::string_view > getExtensions()
void parseFileType(const std::string &filename, std::span< std::string > &cmdLine) override
std::string_view fileTypeHelp() const override
std::string_view fileTypeCategoryName() const override
std::string_view optionHelp() const override
Like std::string_view, but with the extra guarantee that it refers to a zero-terminated string.
This file implemented 3 utility functions:
Definition Autofire.cc:11