|
VLink
2.0.0
A high-performance communication middleware
|
Reusable base implementation of SchemaPluginInterface for mixed Protobuf / FlatBuffers metadata.
More...
#include <schema_plugin_base.h>
Protected Member Functions | |
| SchemaPluginBase () | |
| Initialises the schema caches and primes the VLink memory pool. More... | |
| ~SchemaPluginBase () override | |
| Releases cached dynamic messages and FlatBuffers parsers owned by the plugin. More... | |
| SchemaData | search_schema (const std::string &name, SchemaType schema_type=SchemaType::kUnknown) override |
| Locates a schema by name within an optional family. More... | |
| std::vector< SchemaData > | get_all_schemas (SchemaType schema_type=SchemaType::kUnknown) override |
| Returns every cached schema, optionally restricted to a single family. More... | |
| ProtobufDescriptorPtr | search_protobuf_descriptor (const std::string &name) override |
| Returns the Protobuf descriptor for a fully qualified type name. More... | |
| ProtobufMessagePtr | create_protobuf_message (const std::string &name) override |
| Returns a cached dynamic Protobuf message instance for the type. More... | |
| FlatbuffersSchemaPtr | search_flatbuffers_schema (const std::string &name) override |
| Returns a verified FlatBuffers BFBS reflection schema. More... | |
| FlatbuffersParserPtr | create_flatbuffers_parser (const std::string &name) override |
| Returns a freshly constructed FlatBuffers parser for the named root type. More... | |
Protected Member Functions inherited from vlink::SchemaPluginInterface | |
| SchemaPluginInterface ()=default | |
| virtual | ~SchemaPluginInterface ()=default |
Additional Inherited Members | |
Public Types inherited from vlink::SchemaPluginInterface | |
| using | ProtobufDescriptorPtr = void * |
Opaque alias for a google::protobuf::Descriptor pointer. More... | |
| using | ProtobufMessagePtr = void * |
Opaque alias for a google::protobuf::Message pointer. More... | |
| using | FlatbuffersSchemaPtr = void * |
Opaque alias for a reflection::Schema pointer (FlatBuffers BFBS). More... | |
| using | FlatbuffersParserPtr = void * |
Opaque alias for a flatbuffers::Parser pointer pre-loaded with a root type. More... | |
Public Member Functions inherited from vlink::SchemaPluginInterface | |
| virtual VersionInfo | get_version_info () const =0 |
| Reports the plugin's version and build identity. More... | |
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.
|
inlineprotected |
Initialises the schema caches and primes the VLink memory pool.
Details.
|
inlineoverrideprotected |
Releases cached dynamic messages and FlatBuffers parsers owned by the plugin.
|
inlineoverrideprotectedvirtual |
Returns a freshly constructed FlatBuffers parser for the named root type.
| name | Fully qualified FlatBuffers root type name. |
flatbuffers::Parser pointer, or nullptr when unknown. Implements vlink::SchemaPluginInterface.
|
inlineoverrideprotectedvirtual |
Returns a cached dynamic Protobuf message instance for the type.
| name | Fully qualified Protobuf message name. |
nullptr when unknown. Implements vlink::SchemaPluginInterface.
|
inlineoverrideprotectedvirtual |
Returns every cached schema, optionally restricted to a single family.
| schema_type | Family filter, or SchemaType::kUnknown for everything. |
Implements vlink::SchemaPluginInterface.
|
inlineoverrideprotectedvirtual |
Returns a verified FlatBuffers BFBS reflection schema.
| name | Fully qualified FlatBuffers root type name. |
reflection::Schema pointer, or nullptr when unknown. Implements vlink::SchemaPluginInterface.
|
inlineoverrideprotectedvirtual |
Returns the Protobuf descriptor for a fully qualified type name.
| name | Fully qualified Protobuf message name. |
nullptr when unknown. Implements vlink::SchemaPluginInterface.
|
inlineoverrideprotectedvirtual |
Locates a schema by name within an optional family.
| name | Serialisation type or fully qualified message name. |
| schema_type | Family hint, or SchemaType::kUnknown for cross-family probing. |
SchemaData, or an empty record on miss. Implements vlink::SchemaPluginInterface.