class PluginLoader

Unified plugin loader that works transparently in both dynamic library and monolithic modes.

Public

Methods

staticLoad

static LoadedPlugin Load(const String &pluginName, void *passThrough = nullptr)

Loads a plugin by name.

In dynamic library mode: loads the dynamic library and calls its LoadPlugin() entry point. In monolithic mode: looks up the static registry and calls the registration function.

Falls through to dynamic loading for plugins not in the static registry.

pluginName
Name of the plugin to load.
passThrough
Optional parameter that will be passed to the LoadPlugin function. Looks up LoadPlugin function with a single void* parameter if provided, otherwise looks up LoadPlugin function with no parameters.

Returns: LoadedPlugin with the result and callbacks for lifecycle management.

staticUnload

static void Unload(LoadedPlugin &plugin)

Unloads a previously loaded plugin.

Calls the unload function if available, then unloads the dynamic library in dynamic library mode.

staticGetName

static const char *GetName(const LoadedPlugin &plugin)

Gets the plugin name.