carb::PluginRegistrationDesc
Defined in carb/Framework.h
-
struct PluginRegistrationDesc
Describes the different functions a plugin can define for use by carb::Framework.
Populate this struct and register a plugin with carb::Framework::registerPlugin() for static plugins.
Dynamic plugins are registered via CARB_PLUGIN_IMPL.
Public Members
-
OnPluginRegisterFn onPluginRegisterFn
This or onPluginRegisterExFn required. Preferred over onPluginRegisterExFn.
-
OnPluginStartupFn onPluginStartupFn
Can be
nullptr
.
-
OnPluginShutdownFn onPluginShutdownFn
Can be
nullptr
.
-
GetPluginDepsFn getPluginDepsFn
Can be
nullptr
.
-
OnReloadDependencyFn onReloadDependencyFn
Can be
nullptr
.
-
OnPluginPreStartupFn onPluginPreStartupFn
Can be
nullptr
.
-
OnPluginPostShutdownFn onPluginPostShutdownFn
Can be
nullptr
.
-
OnPluginRegisterExFn onPluginRegisterExFn
Can be
nullptr
.
-
OnPluginStartupExFn onPluginStartupExFn = nullptr
Can be
nullptr
. Preferred over onPluginStartupFn.
-
OnPluginRegisterEx2Fn onPluginRegisterEx2Fn = nullptr
Can be
nullptr
. Preferred over onPluginRegisterFn and onPluginRegisterExFn.
-
FourCC const checkValue = {kCarb_FourCC}
These members exists as a version of PluginRegistrationDesc without changing the framework version to simplify adoption. Static plugins that use Framework::registerPlugin() but were compiled with an earlier version of this struct that did not have these members will not produce the required bit pattern, thereby instructing the Framework that the subsequent members are not valid and cannot be read.
-
size_t const sizeofThis = {sizeof(PluginRegistrationDesc)}
The size of this object in bytes. This is only valid if the checkValue member is set to kCarb_FourCC. If it is not, this member and other following members will not be accessed in order to avoid undefined behavior.
-
OnPluginQuickShutdownFn onPluginQuickShutdownFn = nullptr
Can be
nullptr
. Function that will be called for the plugin if carb::quickReleaseFrameworkAndTerminate() is invoked.
-
Version frameworkVersion = {kFrameworkVersion}
Specifies the framework version required by this plugin.
-
OnPluginRegisterFn onPluginRegisterFn