| 77 | } |
| 78 | |
| 79 | static std::unique_ptr<EngineRoot> createEngineRoot(bool enableVis = true, bool loadPlugins = true) |
| 80 | { |
| 81 | nlohmann::json settings = readEngineSettings({}); |
| 82 | |
| 83 | std::vector<PluginFactory> pluginFactories; |
| 84 | |
| 85 | if (loadPlugins) |
| 86 | { |
| 87 | pluginFactories = loadPluginFactories<Plugin, PluginConfig>(getAllPluginFilepathsInDirectories(EngineRootFactory::getDefaultPluginDirs())); |
| 88 | } |
| 89 | |
| 90 | EngineRootConfig config; |
| 91 | config.engineSettings = settings; |
| 92 | config.enableVis = enableVis; |
| 93 | auto engineRoot = std::make_unique<EngineRoot>(config); |
| 94 | engineRoot->loadPlugins(pluginFactories); |
| 95 | return engineRoot; |
| 96 | } |
| 97 | |
| 98 | } // namespace skybolt |
| 99 |
nothing calls this directly
no test coverage detected