| 7 | } |
| 8 | |
| 9 | void SourceManager::registerSource(std::string name, SourceHandler* handler) { |
| 10 | if (sources.find(name) != sources.end()) { |
| 11 | spdlog::error("Tried to register new source with existing name: {0}", name); |
| 12 | return; |
| 13 | } |
| 14 | sources[name] = handler; |
| 15 | onSourceRegistered.emit(name); |
| 16 | } |
| 17 | |
| 18 | void SourceManager::unregisterSource(std::string name) { |
| 19 | if (sources.find(name) == sources.end()) { |
no test coverage detected