VLink 2.0.0
A high-performance communication middleware
Loading...
Searching...
No Matches
vlink::ConfPluginInterface Struct Referenceabstract

Pure-virtual plugin interface for external transport Conf factories. More...

#include <conf_plugin_interface.h>

Collaboration diagram for vlink::ConfPluginInterface:

Public Member Functions

virtual TransportType get_transport_type () const =0
 Returns the transport backend handled by this plugin.
virtual std::unique_ptr< Confcreate () const =0
 Creates and returns a new transport Conf instance.

Protected Member Functions

 ConfPluginInterface ()=default
virtual ~ConfPluginInterface ()=default

Detailed Description

Pure-virtual plugin interface for external transport Conf factories.

Each VLink transport plugin exports exactly one concrete subclass of this interface. The VLink runtime loads the plugin shared library, locates the registered instance via VLINK_PLUGIN_REGISTER, and queries it for the supported transport backend and new Conf objects.

Constructor & Destructor Documentation

◆ ConfPluginInterface()

vlink::ConfPluginInterface::ConfPluginInterface ( )
protecteddefault
Here is the caller graph for this function:

◆ ~ConfPluginInterface()

virtual vlink::ConfPluginInterface::~ConfPluginInterface ( )
protectedvirtualdefault

Member Function Documentation

◆ create()

virtual std::unique_ptr< Conf > vlink::ConfPluginInterface::create ( ) const
nodiscardpure virtual

Creates and returns a new transport Conf instance.

Called once per Url construction that matches this plugin's transport. The returned object must be fully initialised and ready for parse() calls. Ownership is transferred to the caller via unique_ptr.

Returns
A heap-allocated Conf subclass specific to this transport.
Here is the call graph for this function:

◆ get_transport_type()

virtual TransportType vlink::ConfPluginInterface::get_transport_type ( ) const
nodiscardpure virtual

Returns the transport backend handled by this plugin.

Called by Url::load_for_plugin() to determine whether this plugin supports the transport of the URL being constructed.

Returns
The TransportType enumeration value identifying the transport backend.

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