Polyphase Game Engine
Loading...
Searching...
No Matches
RuntimePluginManager Class Reference

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.
 
PolyphaseEngineAPIGetEngineAPI ()
 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 RuntimePluginManagerGet ()
 

Detailed Description

Singleton manager for runtime plugins.

Plugins register themselves during static initialization or explicit registration. The engine calls TickAllPlugins each frame.

Member Function Documentation

◆ Create()

void RuntimePluginManager::Create ( )
static

◆ Destroy()

void RuntimePluginManager::Destroy ( )
static

◆ Get()

RuntimePluginManager * RuntimePluginManager::Get ( )
static

◆ GetEngineAPI()

PolyphaseEngineAPI * RuntimePluginManager::GetEngineAPI ( )
inline

Get the engine API struct for plugins.

◆ GetPluginCount()

size_t RuntimePluginManager::GetPluginCount ( ) const
inline

Get number of registered plugins.

◆ Initialize()

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.

◆ IsRegistered()

bool RuntimePluginManager::IsRegistered ( const std::string &  pluginId) const

Check if a plugin is registered.

◆ RegisterPlugin()

void RuntimePluginManager::RegisterPlugin ( const PolyphasePluginDesc desc,
const std::string &  pluginId 
)

Register a plugin descriptor.

Can be called during static initialization or explicitly.

Parameters
descPlugin descriptor
pluginIdUnique identifier for the plugin

◆ Shutdown()

void RuntimePluginManager::Shutdown ( )

Shutdown all plugins (calls OnUnload).

Call this before engine shutdown.

◆ TickAllPlugins()

void RuntimePluginManager::TickAllPlugins ( float  deltaTime)

Tick all loaded plugins.

Called once per frame from the main loop.

Parameters
deltaTimeTime elapsed since last frame in seconds

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