| 504 | } |
| 505 | |
| 506 | static void setFluxSourceImpl( |
| 507 | const std::string& filename, FluxSourceProto* proto) |
| 508 | { |
| 509 | for (const auto& it : fluxConstructors) |
| 510 | { |
| 511 | std::smatch match; |
| 512 | if (std::regex_match(filename, match, it.pattern)) |
| 513 | { |
| 514 | if (!it.source) |
| 515 | throw new InapplicableValueException(); |
| 516 | it.source(match[1], proto); |
| 517 | return; |
| 518 | } |
| 519 | } |
| 520 | |
| 521 | error("unrecognised flux filename '{}'", filename); |
| 522 | } |
| 523 | |
| 524 | void Config::setFluxSource(std::string filename) |
| 525 | { |
no test coverage detected