Apama 10.7.2 | Developing Apama Applications | Developing EPL Plug-ins | Writing EPL Plug-ins in C++ | Creating a plug-in using C++ | Load-time or unload-time code
 
Load-time or unload-time code
If you need to execute code at the time the plug-in is loaded, then you should put it in the plug-in class constructor.
If you need to execute code at the time the plug-in is unloaded, then you should put it in the plug-in class destructor.
Typically, you will register any callbacks at load time in the constructor.
class MyPlugin: public EPLPlugin<MyPlugin>
{
MyPlugin(): base_plugin_t("MyPlugin") {
// load-time code here
}
~MyPlugin() {
// unload-time code here
}
};