Go to the documentation of this file.
13 static std::vector<pair<int, string>> images;
25 int id = option[3] -
'a';
26 images.emplace_back(
id,
getArgument(option, cmdLine));
34 if (
auto it =
ranges::find_if(images, [&](
auto& p) {
return p.first == id; });
36 result = std::move(it->second);
46 if (!images.empty()) {
47 char hd = char(::toupper(
'a' + images.front().first));
54 return "Use hard disk image in argument for the IDE or SCSI extensions";
void registerOption(const char *str, CLIOption &cliOption, ParsePhase phase=PHASE_LAST, unsigned length=2)
void parseOption(const std::string &option, span< std::string > &cmdLine) override
auto end(const zstring_view &x)
static std::string getImageForId(int id)
void parseDone() override
HDImageCLI(CommandLineParser &parser)
static std::string getArgument(const std::string &option, span< std::string > &cmdLine)
std::string_view optionHelp() const override
auto find_if(InputRange &&range, UnaryPredicate pred)
This file implemented 3 utility functions: