|
Deki 0.19.0
Modular C++ 2D engine for embedded displays and desktop
|
The available firmware builders: the backends packages and plugins contribute, plus builder DLL plugins loaded from ~/.deki-editor/builders/. More...
#include <C:/Users/kirby/Documents/Github/deki/deki-editor/deki-editor/include/deki-editor/build/BuilderRegistry.h>
Public Types | |
| using | BuiltInProvider = void (*)(BuilderRegistry&) |
| Who supplies the builders that ship with the editor. | |
Public Member Functions | |
| void | RegisterBuilder (std::unique_ptr< ITargetBuilder > builder) |
| Registers a built-in builder and takes ownership of it. | |
| void | RegisterPluginBuilder (ITargetBuilder *builder, void(*destroy)(ITargetBuilder *), const std::string &package={}) |
| Registers a builder created by a loaded package module, with that module's destroy function. | |
| void | RemovePackageBuilders (const std::string &package) |
| Destroys and forgets every builder package registered. | |
| ITargetBuilder * | GetBuilder (const std::string &frameworkId) |
| The builder claiming a framework id, or nullptr. | |
| ITargetBuilder * | GetBuilderForPlatform (const PlatformConfig &config) |
| The builder for a platform, chosen by its framework. | |
| std::string | DescribeMissingBuilder (const PlatformConfig &config) const |
| Message for when GetBuilderForPlatform returned nullptr. | |
| std::vector< ITargetBuilder * > | GetAllBuilders () const |
| std::vector< std::string > | GetSupportedPlatforms (const std::string &metadataPath) const |
| The platforms a package supports, according to its metadata file. | |
| void | EnsureLoaded () |
| Registers the built-ins and scans once for builder plugins. | |
| void | LoadBuilderPlugins () |
| Scans for builder plugins. EnsureLoaded() is the normal entry point. | |
| void | SetBuiltInProvider (BuiltInProvider provider) |
| void | Shutdown () |
| Destroys builders, then unloads plugin modules. | |
| bool | LoadOneBuilderPlugin (const std::string &path) |
| Loads one plugin module; false when it was refused. | |
Static Public Member Functions | |
| static BuilderRegistry & | Instance () |
The available firmware builders: the backends packages and plugins contribute, plus builder DLL plugins loaded from ~/.deki-editor/builders/.
BuildPanel asks it for the builder of the selected platform.
| using DekiEditor::BuilderRegistry::BuiltInProvider = void (*)(BuilderRegistry&) |
Who supplies the builders that ship with the editor.
Their owner installs a provider, so the registry names no concrete backend and deki-editor.dll does not depend on the executable.
|
static |
| void DekiEditor::BuilderRegistry::RegisterBuilder | ( | std::unique_ptr< ITargetBuilder > | builder | ) |
Registers a built-in builder and takes ownership of it.
| void DekiEditor::BuilderRegistry::RegisterPluginBuilder | ( | ITargetBuilder * | builder, |
| void(* | destroy )(ITargetBuilder *), | ||
| const std::string & | package = {} ) |
Registers a builder created by a loaded package module, with that module's destroy function.
Its vtable and operator delete live in that module, so the registry never deletes it.
| void DekiEditor::BuilderRegistry::RemovePackageBuilders | ( | const std::string & | package | ) |
Destroys and forgets every builder package registered.
Call it before that package's library is unloaded, since the builders' code and vtables live there.
| ITargetBuilder * DekiEditor::BuilderRegistry::GetBuilder | ( | const std::string & | frameworkId | ) |
The builder claiming a framework id, or nullptr.
See BuilderDispatch.h for why there is no fallback.
| ITargetBuilder * DekiEditor::BuilderRegistry::GetBuilderForPlatform | ( | const PlatformConfig & | config | ) |
The builder for a platform, chosen by its framework.
| std::string DekiEditor::BuilderRegistry::DescribeMissingBuilder | ( | const PlatformConfig & | config | ) | const |
Message for when GetBuilderForPlatform returned nullptr.
| std::vector< ITargetBuilder * > DekiEditor::BuilderRegistry::GetAllBuilders | ( | ) | const |
| std::vector< std::string > DekiEditor::BuilderRegistry::GetSupportedPlatforms | ( | const std::string & | metadataPath | ) | const |
The platforms a package supports, according to its metadata file.
Each builder reads the dependencies there and reports whether it is compatible.
| void DekiEditor::BuilderRegistry::EnsureLoaded | ( | ) |
Registers the built-ins and scans once for builder plugins.
Safe to call repeatedly. Lazy rather than at editor start because the headless CLI and the MCP server (the routes a CI build takes) reach FirmwareBuildService without the editor's boot path.
| void DekiEditor::BuilderRegistry::LoadBuilderPlugins | ( | ) |
Scans for builder plugins. EnsureLoaded() is the normal entry point.
| void DekiEditor::BuilderRegistry::SetBuiltInProvider | ( | BuiltInProvider | provider | ) |
| void DekiEditor::BuilderRegistry::Shutdown | ( | ) |
Destroys builders, then unloads plugin modules.
Call it before the process exits, like PluginLoader::UnloadAllPlugins: Instance() is a function-local static destroyed after main returns, and unloading a module then would run its detach against editor statics that are already gone.
| bool DekiEditor::BuilderRegistry::LoadOneBuilderPlugin | ( | const std::string & | path | ) |
Loads one plugin module; false when it was refused.