![]() |
MaCh3
2.8.0
Reference Guide
|
Plugin interface and registration macros for MaCh3. More...
Go to the source code of this file.
Classes | |
| class | M3::IPlugin |
| Interface for MaCh3 plugins and modules. More... | |
| class | M3::PluginBase |
| Base class for core modules in MaCh3. More... | |
Namespaces | |
| M3 | |
| Main namespace for MaCh3 software. | |
Macros | |
| #define | MACH3_REGISTER_PLUGIN(PluginClass) |
| Macro to register a plugin class with MaCh3. More... | |
Typedefs | |
| typedef IPlugin | M3::IModule |
| Alias for IPlugin, used for core modules. More... | |
| typedef PluginBase | M3::IModuleBase |
| Alias for IPluginBase, used for core modules. More... | |
| typedef std::uint32_t(* | plugin_api_version_t) () |
| Function pointer type for the plugin API-version query. More... | |
| typedef M3::IPlugin *(* | create_plugin_t) () |
| Function pointer type for the plugin factory. More... | |
| typedef void(* | destroy_plugin_t) (M3::IPlugin *) |
| Function pointer type for plugin destructor function. More... | |
Variables | |
| constexpr std::uint32_t | M3::PLUGIN_API_VERSION = 1 |
| Fix API compatibility: increment when the plugin/parser contract changes incompatibly. More... | |
Plugin interface and registration macros for MaCh3.
Definition in file plugin.hpp.
| #define MACH3_REGISTER_PLUGIN | ( | PluginClass | ) |
Macro to register a plugin class with MaCh3.
This macro generates the required API-version, factory and destructor functions for a plugin class. Use it in your plugin implementation file.
Fix API compatibility: export the version and factories even with hidden default visibility. functions generated by MACH3_REGISTER_PLUGIN are now visible to code outside the plugin’s shared library. thanks to attribute((visibility("default"))) that matters when a plugin is built with hidden visibility by default, for example with -fvisibility=hidden.
| PluginClass | The plugin class that implements M3::IPlugin |
Example usage:
Definition at line 87 of file plugin.hpp.
| typedef M3::IPlugin*(* create_plugin_t) () |
Function pointer type for the plugin factory.
Definition at line 60 of file plugin.hpp.
| destroy_plugin_t |
Function pointer type for plugin destructor function.
Definition at line 64 of file plugin.hpp.
| typedef std::uint32_t(* plugin_api_version_t) () |
Function pointer type for the plugin API-version query.
Definition at line 57 of file plugin.hpp.