| 15 | CoreImpl::~CoreImpl() {} |
| 16 | |
| 17 | Result<> CoreImpl::addModule(std::shared_ptr<Module> mod) { |
| 18 | if (this->findModule(mod->id())) { |
| 19 | return Err("Module with ID '{}' is already registered", mod->id()); |
| 20 | } |
| 21 | |
| 22 | m_modules.push_back(std::move(mod)); |
| 23 | |
| 24 | return Ok(); |
| 25 | } |
| 26 | |
| 27 | Module* CoreImpl::findModule(std::string_view id) { |
| 28 | for (auto& mod : m_modules) { |
nothing calls this directly
no test coverage detected