v2.33
 
IPlugin Class Referenceabstract

The interface for plugin. More...

Public Member Functions

virtual bool initialize (const wchar_t *pluginPath)=0
 This function is called on plugin initialization.
 
virtual void stop ()=0
 This function is called on plugin unloading.
 
virtual ~IPlugin ()
 Destroys the plugin.
 

Detailed Description

The interface for plugin.

This interface must be implemented by classes which are supposed to be registered as plugins in Renga. Plugins are loaded and initialized on the application start.

Please note that for all plugins the macros EXPORT_PLUGIN(PluginClassName) must be defined.

The simplest plugin can be defined as follows:

#include <IPlugin.h>
class ExamplePlugin: public plugins::IPlugin
{
public:
bool initialize(const wchar_t* pluginDir){return true;};
void stop(){};
};
EXPORT_PLUGIN(ExamplePlugin);
The interface for plugin.
Definition IPlugin.h:41

Member Function Documentation

◆ initialize()

virtual bool initialize ( const wchar_t * pluginPath)
pure virtual

This function is called on plugin initialization.

Parameters
[in]pluginPathPointer a the null-terminated plugin path string. It is provided to help the plugin to locate its resources.

◆ stop()

virtual void stop ( )
pure virtual

This function is called on plugin unloading.

The plugin should release all owned resources here.