VLink 2.0.0
A high-performance communication middleware
载入中...
搜索中...
未找到
vlink::Conf结构体 参考

Abstract base class for VLink transport configuration objects. 更多...

#include <conf.h>

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

Public 类型

using PropertiesMap = std::map<std::string, std::string>
 Key/value property map type.

Public 成员函数

virtual ~Conf ()
 Virtual destructor.
virtual bool parse (ImplType impl_type) const
 Validates the conf for the given node role and caches the type.
virtual bool is_valid () const
 Returns true when the configuration holds valid, usable data.
virtual ImplType get_impl_type () const
 Returns the most recently parsed ImplType.
virtual TransportType get_transport_type () const
 Returns the transport backend this configuration represents.

Public 属性

uint32_t hash_code {0}
 Hash of the URL string; used for fast URL lookup in caches.

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 class for VLink transport configuration objects.

Each supported transport backend has a corresponding Conf subclass that implements the virtual factory methods (create_publisher, create_server, etc.) to produce transport-specific NodeImpl instances. The base class provides default implementations that return nullptr / false, so subclasses only need to override the methods they support.

Conf objects are held exclusively by Url and the six Node<> template classes; they are not intended for direct use by application code.

注解
The parse() method caches the ImplType so that subsequent factory calls know which node role is being requested.

成员类型定义说明

◆ PropertiesMap

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

Key/value property map type.

Used by transport conf subclasses and NodeImpl to store DDS QoS strings, IP addresses, buffer sizes, and other per-channel tuning parameters (e.g. "dds.ip" = "127.0.0.1").

构造及析构函数说明

◆ ~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
nodiscardprotectedvirtual

◆ create_getter()

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

◆ create_publisher()

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

◆ create_server()

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

◆ create_setter()

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

◆ create_subscriber()

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

◆ get_impl_type()

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

Returns the most recently parsed ImplType.

返回
ImplType cached by the last call to parse(); kUnknownImplType before parse() is called.

vlink::Url 重载.

◆ get_transport_type()

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

Returns the transport backend this configuration represents.

The base implementation returns TransportType::kUnknown. Each subclass overrides this to return its own TransportType value.

返回
TransportType identifier for this conf.

vlink::Url 重载.

◆ is_valid()

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

Returns true when the configuration holds valid, usable data.

The base implementation always returns false. Subclasses override this to perform transport-specific validation.

返回
true if the configuration is ready to create NodeImpl objects.

vlink::Url 重载.

◆ parse()

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

Validates the conf for the given node role and caches the type.

Called by the Node<> template before invoking any create_*() factory. The base implementation logs a fatal message and returns false for kUnknownImplType; otherwise it caches impl_type and returns true. Concrete subclasses typically call this base and then validate their own fields.

参数
impl_typeThe role being requested (e.g. kPublisher).
返回
true on success; false if the type is unknown.

vlink::Url 重载.

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

◆ parse_protocol()

virtual bool vlink::Conf::parse_protocol ( struct Protocol * protocol)
nodiscardprotectedvirtual
这是这个函数的调用关系图:

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

Hash of the URL string; used for fast URL lookup in caches.


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