fourdst_plugin 0.0.1a
C++ Plugin Manager
|
Plugin factory system and macros for creating loadable plugins. More...
#include "fourdst/plugin/iplugin.h"
Classes | |
class | fourdst::plugin::IPluginBase |
Base class providing default implementations for plugin identification. More... | |
class | fourdst::plugin::PluginBase |
Namespaces | |
namespace | fourdst |
namespace | fourdst::plugin |
Main namespace for the FourDST plugin system. | |
Macros | |
#define | FOURDST_PLUGIN_EXPORT extern "C" |
Platform-specific macro for exporting plugin symbols on other compilers. | |
#define | FOURDST_DECLARE_PLUGIN(className, pluginName, pluginVersion) |
Macro to declare a plugin with automatic factory function generation. | |
Typedefs | |
typedef IPlugin *(* | fourdst::plugin::plugin_creator_t) () |
Function pointer type for plugin creation functions. | |
typedef void(* | fourdst::plugin::plugin_destroyer_t) (IPlugin *) |
Function pointer type for plugin destruction functions. | |
Plugin factory system and macros for creating loadable plugins.
This file provides the infrastructure for creating dynamically loadable plugins. It includes platform-specific export macros, base classes for plugin implementation, and convenience macros for plugin declaration.
#define FOURDST_DECLARE_PLUGIN | ( | className, | |
pluginName, | |||
pluginVersion ) |
Macro to declare a plugin with automatic factory function generation.
This macro should be used in exactly one source file per plugin to generate the required factory functions and define the plugin metadata. It creates:
className | The C++ class name that implements the plugin interface |
pluginName | A string literal containing the plugin's name |
pluginVersion | A string literal containing the plugin's version |
Example usage:
#define FOURDST_PLUGIN_EXPORT extern "C" |
Platform-specific macro for exporting plugin symbols on other compilers.