| 13 | LoaderError::LoaderError(const std::string& what): std::runtime_error(what) {} |
| 14 | |
| 15 | std::shared_ptr<Module> Loader::loadModule(std::span<uint8_t> moduleData) const { |
| 16 | if (ModuleMetadataView::isMetadata(moduleData)) { |
| 17 | auto metadata = ModuleMetadataView::fromBuffer(moduleData); |
| 18 | |
| 19 | return this->loadModuleByName(metadata->getName(), metadata->checksum); |
| 20 | } |
| 21 | else { |
| 22 | return this->loadModuleFromContents(moduleData); |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | std::shared_ptr<Module> Loader::loadModuleByName(const std::string& name, const std::string& checksum) const { |
| 27 | auto* foundModule = registry_.getModule(name); |
nothing calls this directly
no test coverage detected