DEKI/ENGINE docs
manual api reference
Deki 0.40.1
Modular C++ engine with a visual editor, for 2D and 3D
Loading...
Searching...
No Matches

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

std::string DescribeMissingBuilder (const PlatformConfig &config) const
 Message for when GetBuilderForPlatform returned nullptr.
void EnsureLoaded ()
 Registers the built-ins and scans once for builder plugins.
std::vector< ITargetBuilder * > GetAllBuilders () const
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::vector< std::string > GetSupportedPlatforms (const std::string &metadataPath) const
 The platforms a package supports, according to its metadata file.
void LoadBuilderPlugins ()
 Scans for builder plugins. EnsureLoaded() is the normal entry point.
bool LoadOneBuilderPlugin (const std::string &path)
 Loads one plugin module; false when it was refused.
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.
void SetBuiltInProvider (BuiltInProvider provider)
void SetPackageBuildErrors (std::vector< std::string > errors)
 What the last build of the project's packages failed on (its error lines), or nothing when it built.
void Shutdown ()
 Destroys builders, then unloads plugin modules.

Static Public Member Functions

static BuilderRegistry & Instance ()

Detailed Description

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.

Member Typedef Documentation

◆ BuiltInProvider

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.

Member Function Documentation

◆ DescribeMissingBuilder()

std::string DekiEditor::BuilderRegistry::DescribeMissingBuilder ( const PlatformConfig & config) const

Message for when GetBuilderForPlatform returned nullptr.

◆ EnsureLoaded()

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.

◆ GetAllBuilders()

std::vector< ITargetBuilder * > DekiEditor::BuilderRegistry::GetAllBuilders ( ) const

◆ GetBuilder()

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.

◆ GetBuilderForPlatform()

ITargetBuilder * DekiEditor::BuilderRegistry::GetBuilderForPlatform ( const PlatformConfig & config)

The builder for a platform, chosen by its framework.

◆ GetSupportedPlatforms()

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.

◆ Instance()

BuilderRegistry & DekiEditor::BuilderRegistry::Instance ( )
static

◆ LoadBuilderPlugins()

void DekiEditor::BuilderRegistry::LoadBuilderPlugins ( )

Scans for builder plugins. EnsureLoaded() is the normal entry point.

◆ LoadOneBuilderPlugin()

bool DekiEditor::BuilderRegistry::LoadOneBuilderPlugin ( const std::string & path)

Loads one plugin module; false when it was refused.

◆ RegisterBuilder()

void DekiEditor::BuilderRegistry::RegisterBuilder ( std::unique_ptr< ITargetBuilder > builder)

Registers a built-in builder and takes ownership of it.

◆ RegisterPluginBuilder()

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.

◆ RemovePackageBuilders()

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.

◆ SetBuiltInProvider()

void DekiEditor::BuilderRegistry::SetBuiltInProvider ( BuiltInProvider provider)

◆ SetPackageBuildErrors()

void DekiEditor::BuilderRegistry::SetPackageBuildErrors ( std::vector< std::string > errors)

What the last build of the project's packages failed on (its error lines), or nothing when it built.

The editor sets it after each build, so DescribeMissingBuilder can say the backends are missing because their packages did not build.

◆ Shutdown()

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.


The documentation for this class was generated from the following file: