* Build a human readable list of available drivers, grouped by type. * @param output_iterator The iterator to write the string to. */
| 219 | * @param output_iterator The iterator to write the string to. |
| 220 | */ |
| 221 | void DriverFactoryBase::GetDriversInfo(std::back_insert_iterator<std::string> &output_iterator) |
| 222 | { |
| 223 | for (Driver::Type type = Driver::DT_BEGIN; type != Driver::DT_END; type++) { |
| 224 | fmt::format_to(output_iterator, "List of {} drivers:\n", GetDriverTypeName(type)); |
| 225 | |
| 226 | for (int priority = 10; priority >= 0; priority--) { |
| 227 | for (auto &it : GetDrivers()) { |
| 228 | DriverFactoryBase *d = it.second; |
| 229 | if (d->type != type) continue; |
| 230 | if (d->priority != priority) continue; |
| 231 | fmt::format_to(output_iterator, "{:>18}: {}\n", d->name, d->GetDescription()); |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | fmt::format_to(output_iterator, "\n"); |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | /** |
| 240 | * Construct a new DriverFactory. |
nothing calls this directly
no test coverage detected