VLink  2.0.0
A high-performance communication middleware
vlink::ConfPluginInterface结构体 参考abstract

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

#include <conf_plugin_interface.h>

vlink::ConfPluginInterface 的协作图:

Public 成员函数

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

Protected 成员函数

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

详细描述

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().

构造及析构函数说明

◆ ConfPluginInterface()

vlink::ConfPluginInterface::ConfPluginInterface ( )
protecteddefault

◆ ~ConfPluginInterface()

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

成员函数说明

◆ 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.

返回
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.

返回
TransportType value covered by this plugin.

该结构体的文档由以下文件生成: