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

Method setImageWriter

lib/config/config.cc:580–596  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

578}
579
580void Config::setImageWriter(std::string filename)
581{
582 for (const auto& it : imageConstructors)
583 {
584 if (endsWith(filename, it.extension))
585 {
586 if (it.mode == MODE_RO)
587 throw new InapplicableValueException();
588
589 overrides()->mutable_image_writer()->set_type(it.type);
590 overrides()->mutable_image_writer()->set_filename(filename);
591 return;
592 }
593 }
594
595 error("unrecognised image filename '{}'", filename);
596}
597
598bool Config::hasFluxSource()
599{

Callers 6

fe-read.ccFile · 0.80
fileutils.ccFile · 0.80
writeImageMethod · 0.80
StartWritingMethod · 0.80
OnSaveImageButtonMethod · 0.80
PrepareConfigMethod · 0.80

Calls 2

endsWithFunction · 0.85
errorFunction · 0.85

Tested by

no test coverage detected