|
Polyphase Game Engine
|
Singleton manager for runtime plugins. More...
#include <RuntimePluginManager.h>
Public Member Functions | |
| void | Initialize () |
| Initialize the engine API and call OnLoad for all registered plugins. | |
| void | Shutdown () |
| Shutdown all plugins (calls OnUnload). | |
| void | RegisterPlugin (const PolyphasePluginDesc &desc, const std::string &pluginId) |
| Register a plugin descriptor. | |
| void | TickAllPlugins (float deltaTime) |
| Tick all loaded plugins. | |
| PolyphaseEngineAPI * | GetEngineAPI () |
| Get the engine API struct for plugins. | |
| bool | IsRegistered (const std::string &pluginId) const |
| Check if a plugin is registered. | |
| size_t | GetPluginCount () const |
| Get number of registered plugins. | |
Static Public Member Functions | |
| static void | Create () |
| static void | Destroy () |
| static RuntimePluginManager * | Get () |
Singleton manager for runtime plugins.
Plugins register themselves during static initialization or explicit registration. The engine calls TickAllPlugins each frame.
|
static |
|
static |
|
static |
|
inline |
Get the engine API struct for plugins.
|
inline |
Get number of registered plugins.
| void RuntimePluginManager::Initialize | ( | ) |
Initialize the engine API and call OnLoad for all registered plugins.
Call this after the engine is initialized but before the main loop.
| bool RuntimePluginManager::IsRegistered | ( | const std::string & | pluginId | ) | const |
Check if a plugin is registered.
| void RuntimePluginManager::RegisterPlugin | ( | const PolyphasePluginDesc & | desc, |
| const std::string & | pluginId | ||
| ) |
Register a plugin descriptor.
Can be called during static initialization or explicitly.
| desc | Plugin descriptor |
| pluginId | Unique identifier for the plugin |
| void RuntimePluginManager::Shutdown | ( | ) |
Shutdown all plugins (calls OnUnload).
Call this before engine shutdown.
| void RuntimePluginManager::TickAllPlugins | ( | float | deltaTime | ) |
Tick all loaded plugins.
Called once per frame from the main loop.
| deltaTime | Time elapsed since last frame in seconds |