VLink 2.0.0
A high-performance communication middleware
载入中...
搜索中...
未找到
vlink::SchemaPluginBase类 参考

Default mixed-schema plugin base class for Protobuf and FlatBuffers. 更多...

#include <schema_plugin_base.h>

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

Protected 成员函数

 SchemaPluginBase ()
 Constructs the base plugin and initialises the VLink memory pool.
 ~SchemaPluginBase () override
 Destroys cached runtime objects owned by the plugin.
SchemaData search_schema (const std::string &name, SchemaType schema_type=SchemaType::kUnknown) override
 Finds one schema blob constrained by schema family.
std::vector< SchemaDataget_all_schemas (SchemaType schema_type=SchemaType::kUnknown) override
 Returns all cached schemas filtered by schema family.
ProtobufDescriptorPtr search_protobuf_descriptor (const std::string &name) override
 Looks up a Protobuf descriptor by fully-qualified type name.
ProtobufMessagePtr create_protobuf_message (const std::string &name) override
 Creates a cached Protobuf dynamic message prototype for a type.
FlatbuffersSchemaPtr search_flatbuffers_schema (const std::string &name) override
 Finds the BFBS reflection schema for a FlatBuffers root type.
FlatbuffersParserPtr create_flatbuffers_parser (const std::string &name) override
 Creates a FlatBuffers parser preloaded with the named root type.

额外继承的成员函数

详细描述

Default mixed-schema plugin base class for Protobuf and FlatBuffers.

The intended usage model is:

  1. Protobuf types are already linked into the same plugin/library, so lookups go straight to the generated descriptor pool.
  2. FlatBuffers BFBS blobs are generated at build time and explicitly registered into the static registry owned by the current plugin/library.

This keeps protobuf behaviour compatible with the previous protobuf-only runtime implementation while filling the missing FlatBuffers reflection and parser hooks.

构造及析构函数说明

◆ SchemaPluginBase()

vlink::SchemaPluginBase::SchemaPluginBase ( )
inlineprotected

Constructs the base plugin and initialises the VLink memory pool.

Details

函数调用图:

◆ ~SchemaPluginBase()

vlink::SchemaPluginBase::~SchemaPluginBase ( )
inlineoverrideprotected

Destroys cached runtime objects owned by the plugin.

成员函数说明

◆ create_flatbuffers_parser()

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

Creates a FlatBuffers parser preloaded with the named root type.

参数
nameFully-qualified FlatBuffers root type.
返回
Opaque flatbuffers::Parser handle, or nullptr if not found.

实现了 vlink::SchemaPluginInterface.

◆ create_protobuf_message()

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

Creates a cached Protobuf dynamic message prototype for a type.

参数
nameFully-qualified Protobuf message type.
返回
Opaque message pointer, or nullptr if not found.

实现了 vlink::SchemaPluginInterface.

◆ get_all_schemas()

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

Returns all cached schemas filtered by schema family.

参数
schema_typeSchema family to filter on; SchemaType::kUnknown returns all.
返回
Vector of cached schemas belonging to schema_type.

实现了 vlink::SchemaPluginInterface.

◆ search_flatbuffers_schema()

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

Finds the BFBS reflection schema for a FlatBuffers root type.

参数
nameFully-qualified FlatBuffers root type.
返回
Opaque reflection::Schema handle, or nullptr if not found.

实现了 vlink::SchemaPluginInterface.

◆ search_protobuf_descriptor()

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

Looks up a Protobuf descriptor by fully-qualified type name.

参数
nameFully-qualified Protobuf message type.
返回
Opaque descriptor pointer, or nullptr if not found.

实现了 vlink::SchemaPluginInterface.

◆ search_schema()

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

Finds one schema blob constrained by schema family.

参数
nameSerialization type or fully-qualified message name.
schema_typeCoarse schema family hint, or SchemaType::kUnknown for family-agnostic lookup.
返回
Matching SchemaData, or an empty schema when not found.

实现了 vlink::SchemaPluginInterface.

函数调用图:

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