| 578 | } |
| 579 | |
| 580 | void 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 | |
| 598 | bool Config::hasFluxSource() |
| 599 | { |
no test coverage detected