|
VLink 2.0.0
A high-performance communication middleware
|
Abstract interface for runtime schema lookup and dynamic object creation. More...
#include <schema_plugin_interface.h>
Classes | |
| struct | VersionInfo |
| Plugin version and build metadata. More... | |
Public Types | |
| 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 Member Functions | |
| virtual VersionInfo | get_version_info () const =0 |
| Returns version and build metadata for this plugin. | |
| virtual SchemaData | search_schema (const std::string &name, SchemaType schema_type=SchemaType::kUnknown)=0 |
| Finds one schema constrained by schema family. | |
| virtual std::vector< SchemaData > | get_all_schemas (SchemaType schema_type=SchemaType::kUnknown)=0 |
| Returns all imported or cached schemas filtered by schema family. | |
| virtual ProtobufDescriptorPtr | search_protobuf_descriptor (const std::string &name)=0 |
| Looks up a Protobuf descriptor by fully-qualified message name. | |
| virtual ProtobufMessagePtr | create_protobuf_message (const std::string &name)=0 |
| Creates a Protobuf dynamic message prototype for the named type. | |
| virtual FlatbuffersSchemaPtr | search_flatbuffers_schema (const std::string &name)=0 |
| Looks up a FlatBuffers binary-schema reflection handle by type name. | |
| virtual FlatbuffersParserPtr | create_flatbuffers_parser (const std::string &name)=0 |
| Creates a FlatBuffers parser preloaded with the named schema. | |
Protected Member Functions | |
| SchemaPluginInterface ()=default | |
| virtual | ~SchemaPluginInterface ()=default |
Abstract interface for runtime schema lookup and dynamic object creation.
Loaded as a dynamic plugin via Plugin::load<SchemaPluginInterface>(). SchemaPluginManager provides a convenient singleton accessor.
The interface intentionally exposes both generic schema APIs and encoding-specific runtime hooks:
search_schema() and get_all_schemas() are used by bag/database/MCAP embedding logic.cli/eproto and webviz protobuf decoders.cli/efbs and runtime BFBS-based decoders. | using vlink::SchemaPluginInterface::FlatbuffersParserPtr = void* |
Opaque pointer type for a runtime FlatBuffers Parser instance.
Callers may cast this to flatbuffers::Parser* when FlatBuffers headers are available.
| using vlink::SchemaPluginInterface::FlatbuffersSchemaPtr = void* |
Opaque pointer type for a FlatBuffers reflection::Schema instance.
Callers that include FlatBuffers reflection headers may cast this to reflection::Schema* directly.
| using vlink::SchemaPluginInterface::ProtobufDescriptorPtr = void* |
Opaque pointer type for a google::protobuf::Descriptor.
Callers that know the concrete plugin implementation may cast this to google::protobuf::Descriptor* directly.
| using vlink::SchemaPluginInterface::ProtobufMessagePtr = void* |
Opaque pointer type for a google::protobuf::Message instance.
Callers may cast this to google::protobuf::Message* for dynamic access.
|
protecteddefault |
|
protectedvirtualdefault |
|
nodiscardpure virtual |
Creates a FlatBuffers parser preloaded with the named schema.
The returned parser is backed by the plugin lifetime and already contains the BFBS schema plus the requested root type. For non-FlatBuffers types this returns nullptr.
| name | Fully-qualified FlatBuffers root type name. |
nullptr if not found. Implemented in vlink::SchemaPluginBase.
|
nodiscardpure virtual |
Creates a Protobuf dynamic message prototype for the named type.
For non-Protobuf types this returns nullptr.
| name | Fully-qualified Protobuf message type name. |
Message pointer, or nullptr if not found. Implemented in vlink::SchemaPluginBase.
|
nodiscardpure virtual |
Returns all imported or cached schemas filtered by schema family.
| schema_type | Schema family to filter on; SchemaType::kUnknown returns every cached schema. |
schema_type. Implemented in vlink::SchemaPluginBase.
|
nodiscardpure virtual |
Returns version and build metadata for this plugin.
VersionInfo with name, version, timestamp, tag, and commit ID.
|
nodiscardpure virtual |
Looks up a FlatBuffers binary-schema reflection handle by type name.
The returned handle points at the BFBS-backed reflection::Schema for the requested root type. For non-FlatBuffers types this returns nullptr.
| name | Fully-qualified FlatBuffers root type name. |
nullptr if not found. Implemented in vlink::SchemaPluginBase.
|
nodiscardpure virtual |
Looks up a Protobuf descriptor by fully-qualified message name.
For non-Protobuf types this returns nullptr.
| name | Fully-qualified Protobuf message type name. |
Descriptor pointer, or nullptr if not found. Implemented in vlink::SchemaPluginBase.
|
nodiscardpure virtual |
Finds one schema constrained by schema family.
Callers that already know the expected schema family (for example derived from compile-time traits or discovery metadata) should supply schema_type to skip family-agnostic probing. Passing SchemaType::kUnknown still performs a best-effort lookup across every registered family.
| name | Serialization type / message type name. |
| schema_type | Coarse schema family hint, or SchemaType::kUnknown for family-agnostic lookup. |
SchemaData, or an empty schema when not found. Implemented in vlink::SchemaPluginBase.