MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / setImageReader

Method setImageReader

lib/config/config.cc:562–578  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

560}
561
562void Config::setImageReader(std::string filename)
563{
564 for (const auto& it : imageConstructors)
565 {
566 if (endsWith(filename, it.extension))
567 {
568 if (it.mode == MODE_WO)
569 throw new InapplicableValueException();
570
571 overrides()->mutable_image_reader()->set_type(it.type);
572 overrides()->mutable_image_reader()->set_filename(filename);
573 return;
574 }
575 }
576
577 error("unrecognised image filename '{}'", filename);
578}
579
580void Config::setImageWriter(std::string filename)
581{

Callers 5

fileutils.ccFile · 0.80
fe-write.ccFile · 0.80
readImageMethod · 0.80
StartWritingMethod · 0.80
PrepareConfigMethod · 0.80

Calls 2

endsWithFunction · 0.85
errorFunction · 0.85

Tested by

no test coverage detected