VLink  2.0.0
A high-performance communication middleware
vlink::SchemaPluginBase类 参考

Reusable base implementation of SchemaPluginInterface for mixed Protobuf / FlatBuffers metadata. 更多...

#include <schema_plugin_base.h>

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

Protected 成员函数

 SchemaPluginBase ()
 Initialises the schema caches and primes the VLink memory pool. 更多...
 
 ~SchemaPluginBase () override
 Releases cached dynamic messages and FlatBuffers parsers owned by the plugin. 更多...
 
SchemaData search_schema (const std::string &name, SchemaType schema_type=SchemaType::kUnknown) override
 Locates a schema by name within an optional family. 更多...
 
std::vector< SchemaDataget_all_schemas (SchemaType schema_type=SchemaType::kUnknown) override
 Returns every cached schema, optionally restricted to a single family. 更多...
 
ProtobufDescriptorPtr search_protobuf_descriptor (const std::string &name) override
 Returns the Protobuf descriptor for a fully qualified type name. 更多...
 
ProtobufMessagePtr create_protobuf_message (const std::string &name) override
 Returns a cached dynamic Protobuf message instance for the type. 更多...
 
FlatbuffersSchemaPtr search_flatbuffers_schema (const std::string &name) override
 Returns a verified FlatBuffers BFBS reflection schema. 更多...
 
FlatbuffersParserPtr create_flatbuffers_parser (const std::string &name) override
 Returns a freshly constructed FlatBuffers parser for the named root type. 更多...
 

额外继承的成员函数

详细描述

Reusable base implementation of SchemaPluginInterface for mixed Protobuf / FlatBuffers metadata.

Concrete plugins derive from this class and typically only override get_version_info(). The base class is header-only so that linked Protobuf descriptors and registered BFBS blobs remain in the same translation unit as the plugin binary, which is required for the static registries to publish the expected types.

Internal caches are protected by a single mutex; all public methods are safe to call from multiple threads.

构造及析构函数说明

◆ SchemaPluginBase()

vlink::SchemaPluginBase::SchemaPluginBase ( )
inlineprotected

Initialises the schema caches and primes the VLink memory pool.

Details

函数调用图:

◆ ~SchemaPluginBase()

vlink::SchemaPluginBase::~SchemaPluginBase ( )
inlineoverrideprotected

Releases cached dynamic messages and FlatBuffers parsers owned by the plugin.

成员函数说明

◆ create_flatbuffers_parser()

SchemaPluginInterface::FlatbuffersParserPtr vlink::SchemaPluginBase::create_flatbuffers_parser ( const std::string &  name)
inlineoverrideprotectedvirtual

Returns a freshly constructed FlatBuffers parser for the named root type.

参数
nameFully qualified FlatBuffers root type name.
返回
Opaque flatbuffers::Parser pointer, or nullptr when unknown.

实现了 vlink::SchemaPluginInterface.

◆ create_protobuf_message()

SchemaPluginInterface::ProtobufMessagePtr vlink::SchemaPluginBase::create_protobuf_message ( const std::string &  name)
inlineoverrideprotectedvirtual

Returns a cached dynamic Protobuf message instance for the type.

参数
nameFully qualified Protobuf message name.
返回
Opaque message pointer, or nullptr when unknown.

实现了 vlink::SchemaPluginInterface.

◆ get_all_schemas()

std::vector< SchemaData > vlink::SchemaPluginBase::get_all_schemas ( SchemaType  schema_type = SchemaType::kUnknown)
inlineoverrideprotectedvirtual

Returns every cached schema, optionally restricted to a single family.

参数
schema_typeFamily filter, or SchemaType::kUnknown for everything.
返回
Snapshot vector of cached entries.

实现了 vlink::SchemaPluginInterface.

◆ search_flatbuffers_schema()

SchemaPluginInterface::FlatbuffersSchemaPtr vlink::SchemaPluginBase::search_flatbuffers_schema ( const std::string &  name)
inlineoverrideprotectedvirtual

Returns a verified FlatBuffers BFBS reflection schema.

参数
nameFully qualified FlatBuffers root type name.
返回
Opaque reflection::Schema pointer, or nullptr when unknown.

实现了 vlink::SchemaPluginInterface.

函数调用图:

◆ search_protobuf_descriptor()

SchemaPluginInterface::ProtobufDescriptorPtr vlink::SchemaPluginBase::search_protobuf_descriptor ( const std::string &  name)
inlineoverrideprotectedvirtual

Returns the Protobuf descriptor for a fully qualified type name.

参数
nameFully qualified Protobuf message name.
返回
Opaque descriptor pointer, or nullptr when unknown.

实现了 vlink::SchemaPluginInterface.

◆ search_schema()

SchemaData vlink::SchemaPluginBase::search_schema ( const std::string &  name,
SchemaType  schema_type = SchemaType::kUnknown 
)
inlineoverrideprotectedvirtual

Locates a schema by name within an optional family.

参数
nameSerialisation type or fully qualified message name.
schema_typeFamily hint, or SchemaType::kUnknown for cross-family probing.
返回
Cached or freshly imported SchemaData, or an empty record on miss.

实现了 vlink::SchemaPluginInterface.

函数调用图:

该类的文档由以下文件生成: