VLink  2.0.0
A high-performance communication middleware
vlink::RunablePluginInterface Class Referenceabstract

Abstract plugin base that already owns a MessageLoop event thread. More...

#include <runnable_plugin_interface.h>

Inheritance diagram for vlink::RunablePluginInterface:
Collaboration diagram for vlink::RunablePluginInterface:

Public Member Functions

virtual void on_init ()=0
 Called by the host once the plugin's MessageLoop is running. More...
 
virtual void on_deinit ()=0
 Called by the host just before the plugin is unloaded. More...
 

Protected Member Functions

 RunablePluginInterface ()=default
 
 ~RunablePluginInterface () override=default
 

Additional Inherited Members

 Internal queue implementation type. More...
 Back-pressure strategy applied when the bounded queue is at capacity. More...
 Built-in priority levels for kPriorityType loops; higher values dispatch first. More...

Detailed Description

Abstract plugin base that already owns a MessageLoop event thread.

The plugin inherits both the Plugin registration machinery and a MessageLoop, so it can post tasks, run timers and consume VLink subscriptions on its own thread. Lifecycle is split between on_init() (called once after the loop starts) and on_deinit() (called once before the loop is torn down).

Constructor & Destructor Documentation

◆ RunablePluginInterface()

vlink::RunablePluginInterface::RunablePluginInterface ( )
protecteddefault

◆ ~RunablePluginInterface()

vlink::RunablePluginInterface::~RunablePluginInterface ( )
overrideprotecteddefault

Member Function Documentation

◆ on_deinit()

virtual void vlink::RunablePluginInterface::on_deinit ( )
pure virtual

Called by the host just before the plugin is unloaded.

Override to release every resource created in on_init(). After this call the host stops the loop and detaches the shared library.

◆ on_init()

virtual void vlink::RunablePluginInterface::on_init ( )
pure virtual

Called by the host once the plugin's MessageLoop is running.

Override to create subscribers, timers and other primitives that require the loop to be alive. Runs on the caller's thread.


The documentation for this class was generated from the following file: