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

Abstract base for every transport-specific configuration aggregate. 更多...

#include <conf.h>

类 vlink::Conf 继承关系图:
vlink::Conf 的协作图:

Public 类型

using PropertiesMap = std::map< std::string, std::string >
 Key/value property map shared between confs and node implementations. 更多...
 

Public 成员函数

virtual ~Conf ()
 Virtual destructor. 更多...
 
virtual bool parse (ImplType impl_type) const
 Validates the conf for impl_type and caches it for subsequent factories. 更多...
 
virtual bool is_valid () const
 Indicates whether the conf currently holds usable data. 更多...
 
virtual ImplType get_impl_type () const
 Returns the ImplType cached by the most recent parse() call. 更多...
 
virtual TransportType get_transport_type () const
 Returns the transport backend this conf wraps. 更多...
 

Public 属性

uint32_t hash_code {0}
 Channel / topic hash assigned by concrete backends. 更多...
 

Protected 成员函数

 Conf ()
 
virtual bool parse_protocol (struct Protocol *protocol)
 
virtual std::unique_ptr< class ServerImplcreate_server () const
 
virtual std::unique_ptr< class ClientImplcreate_client () const
 
virtual std::unique_ptr< class PublisherImplcreate_publisher () const
 
virtual std::unique_ptr< class SubscriberImplcreate_subscriber () const
 
virtual std::unique_ptr< class SetterImplcreate_setter () const
 
virtual std::unique_ptr< class GetterImplcreate_getter () const
 

友元

struct Url
 
template<typename , typename , SecurityType >
class Server
 
template<typename , typename , SecurityType >
class Client
 
template<typename , SecurityType >
class Publisher
 
template<typename , SecurityType >
class Subscriber
 
template<typename , SecurityType >
class Setter
 
template<typename , SecurityType >
class Getter
 

详细描述

Abstract base for every transport-specific configuration aggregate.

Holds the cached ImplType selected by parse() and declares the protected factory hooks that the public node templates use to instantiate NodeImpl peers. Default implementations of the factory hooks return nullptr so subclasses only need to override the roles they actually support; combine with VLINK_ALLOW_IMPL_TYPE to make the compile-time guard explicit.

注解
Instances are never owned by application code; they are produced by Url and live as long as the node that references them.

成员类型定义说明

◆ PropertiesMap

using vlink::Conf::PropertiesMap = std::map<std::string, std::string>

Key/value property map shared between confs and node implementations.

Stores transport tuning entries (e.g. "dds.ip" = "127.0.0.1") that are read by backends during init() and by helpers such as SslOptions.

构造及析构函数说明

◆ ~Conf()

virtual vlink::Conf::~Conf ( )
virtual

Virtual destructor.

◆ Conf()

vlink::Conf::Conf ( )
protected

成员函数说明

◆ create_client()

virtual std::unique_ptr<class ClientImpl> vlink::Conf::create_client ( ) const
protectedvirtual

◆ create_getter()

virtual std::unique_ptr<class GetterImpl> vlink::Conf::create_getter ( ) const
protectedvirtual

◆ create_publisher()

virtual std::unique_ptr<class PublisherImpl> vlink::Conf::create_publisher ( ) const
protectedvirtual

◆ create_server()

virtual std::unique_ptr<class ServerImpl> vlink::Conf::create_server ( ) const
protectedvirtual

◆ create_setter()

virtual std::unique_ptr<class SetterImpl> vlink::Conf::create_setter ( ) const
protectedvirtual

◆ create_subscriber()

virtual std::unique_ptr<class SubscriberImpl> vlink::Conf::create_subscriber ( ) const
protectedvirtual

◆ get_impl_type()

virtual ImplType vlink::Conf::get_impl_type ( ) const
virtual

Returns the ImplType cached by the most recent parse() call.

返回
Cached ImplType, or kUnknownImplType before parse() runs.

vlink::Url 重载.

◆ get_transport_type()

virtual TransportType vlink::Conf::get_transport_type ( ) const
virtual

Returns the transport backend this conf wraps.

Default implementation returns TransportType::kUnknown; concrete confs (and dynamic plugins) override it to advertise their backend.

返回
Matching TransportType identifier.

vlink::Url 重载.

◆ is_valid()

virtual bool vlink::Conf::is_valid ( ) const
virtual

Indicates whether the conf currently holds usable data.

The base implementation returns false; concrete confs override it to verify that mandatory fields have been populated.

返回
true once the conf is ready to drive create_*() factories.

vlink::Url 重载.

◆ parse()

virtual bool vlink::Conf::parse ( ImplType  impl_type) const
virtual

Validates the conf for impl_type and caches it for subsequent factories.

The base implementation rejects kUnknownImplType (the underlying logger call is configured to abort the process) and stores any other value into impl_type_ so that follow-up create_*() calls know the requested role. Subclasses typically chain Conf::parse() and then run their own checks.

参数
impl_typeRole the caller intends to instantiate.
返回
true on success; the unknown-type fatal path never returns.

vlink::Url 重载.

这是这个函数的调用关系图:

◆ parse_protocol()

virtual bool vlink::Conf::parse_protocol ( struct Protocol protocol)
protectedvirtual

友元及相关函数文档

◆ Client

template<typename , typename , SecurityType >
friend class Client
friend

◆ Getter

template<typename , SecurityType >
friend class Getter
friend

◆ Publisher

template<typename , SecurityType >
friend class Publisher
friend

◆ Server

template<typename , typename , SecurityType >
friend class Server
friend

◆ Setter

template<typename , SecurityType >
friend class Setter
friend

◆ Subscriber

template<typename , SecurityType >
friend class Subscriber
friend

◆ Url

friend struct Url
friend

类成员变量说明

◆ hash_code

uint32_t vlink::Conf::hash_code {0}

Channel / topic hash assigned by concrete backends.


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