VLink  2.0.0
A high-performance communication middleware
vlink::ConfPluginInterface Struct Referenceabstract

Stateless factory contract that external recognized-transport plugins must implement. More...

#include <conf_plugin_interface.h>

Collaboration diagram for vlink::ConfPluginInterface:

Public Member Functions

virtual TransportType get_transport_type () const =0
 Reports the transport identifier this plugin can produce confs for. More...
 
virtual std::unique_ptr< Confcreate () const =0
 Allocates a fresh transport Conf instance. More...
 

Protected Member Functions

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

Detailed Description

Stateless factory contract that external recognized-transport plugins must implement.

Subclasses are loaded from shared libraries by the VLink runtime when a URL uses a recognized transport that is not built in. The interface cannot register a new TransportType or URL scheme; it only supplies Conf instances for existing transport identifiers. It intentionally exposes only the two queries needed by Url::load_for_plugin(); plugin-specific state lives inside the Conf instances returned by create().

Constructor & Destructor Documentation

◆ ConfPluginInterface()

vlink::ConfPluginInterface::ConfPluginInterface ( )
protecteddefault

◆ ~ConfPluginInterface()

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

Member Function Documentation

◆ create()

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

Allocates a fresh transport Conf instance.

Invoked once per Url constructor whose transport matches the plugin. The returned object must be ready to receive parse() calls immediately.

Returns
Heap-allocated transport Conf owned by the caller.

◆ get_transport_type()

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

Reports the transport identifier this plugin can produce confs for.

Called by Url::load_for_plugin() to match URL transports to loaded plugins. The same identifier may be returned by at most one plugin.

Returns
TransportType value covered by this plugin.

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