|
VLink 2.0.0
A high-performance communication middleware
|
Default mixed-schema plugin base class for Protobuf and FlatBuffers. 更多...
#include <schema_plugin_base.h>
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< SchemaData > | get_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. | |
| Protected 成员函数 继承自 vlink::SchemaPluginInterface | |
| SchemaPluginInterface ()=default | |
| virtual | ~SchemaPluginInterface ()=default |
额外继承的成员函数 | |
| Public 类型 继承自 vlink::SchemaPluginInterface | |
| using | ProtobufDescriptorPtr = void* |
Opaque pointer type for a google::protobuf::Descriptor. | |
| using | ProtobufMessagePtr = void* |
Opaque pointer type for a google::protobuf::Message instance. | |
| using | FlatbuffersSchemaPtr = void* |
Opaque pointer type for a FlatBuffers reflection::Schema instance. | |
| using | FlatbuffersParserPtr = void* |
Opaque pointer type for a runtime FlatBuffers Parser instance. | |
| Public 成员函数 继承自 vlink::SchemaPluginInterface | |
| virtual VersionInfo | get_version_info () const =0 |
| Returns version and build metadata for this plugin. | |
Default mixed-schema plugin base class for Protobuf and FlatBuffers.
The intended usage model is:
This keeps protobuf behaviour compatible with the previous protobuf-only runtime implementation while filling the missing FlatBuffers reflection and parser hooks.
|
inlineprotected |
Constructs the base plugin and initialises the VLink memory pool.
Details
|
inlineoverrideprotected |
Destroys cached runtime objects owned by the plugin.
|
inlinenodiscardoverrideprotectedvirtual |
Creates a FlatBuffers parser preloaded with the named root type.
| name | Fully-qualified FlatBuffers root type. |
flatbuffers::Parser handle, or nullptr if not found.
|
inlinenodiscardoverrideprotectedvirtual |
Creates a cached Protobuf dynamic message prototype for a type.
| name | Fully-qualified Protobuf message type. |
nullptr if not found.
|
inlinenodiscardoverrideprotectedvirtual |
Returns all cached schemas filtered by schema family.
| schema_type | Schema family to filter on; SchemaType::kUnknown returns all. |
schema_type.
|
inlinenodiscardoverrideprotectedvirtual |
Finds the BFBS reflection schema for a FlatBuffers root type.
| name | Fully-qualified FlatBuffers root type. |
reflection::Schema handle, or nullptr if not found.
|
inlinenodiscardoverrideprotectedvirtual |
Looks up a Protobuf descriptor by fully-qualified type name.
| name | Fully-qualified Protobuf message type. |
nullptr if not found.
|
inlinenodiscardoverrideprotectedvirtual |
Finds one schema blob constrained by schema family.
| name | Serialization type or fully-qualified message name. |
| schema_type | Coarse schema family hint, or SchemaType::kUnknown for family-agnostic lookup. |
SchemaData, or an empty schema when not found. 实现了 vlink::SchemaPluginInterface.