VLink  2.0.0
A high-performance communication middleware
schema_plugin_interface.h File Reference

Abstract contract for runtime Protobuf / FlatBuffers schema discovery plugins. More...

#include <string>
#include <vector>
#include "../base/plugin.h"
#include "../impl/types.h"
Include dependency graph for schema_plugin_interface.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  vlink::SchemaPluginInterface
 Polymorphic contract for runtime schema lookup and dynamic message construction. More...
 
struct  vlink::SchemaPluginInterface::VersionInfo
 Build provenance reported by a concrete plugin implementation. More...
 

Namespaces

 

Detailed Description

Abstract contract for runtime Protobuf / FlatBuffers schema discovery plugins.

SchemaPluginInterface is the plugin-side contract shared between VLink and any out-of-tree shared library that supplies serialisation metadata for runtime introspection. Plugins are loaded by SchemaPluginManager through the generic Plugin loader and surface a uniform lookup API regardless of whether the underlying metadata lives in a linked Protobuf descriptor pool, in flatc-generated BFBS blobs, or in some bespoke registry.

Capability Method Returns when missing
Version probe get_version_info() populated info
Generic schema lookup search_schema() name-only SchemaData
Bulk enumeration get_all_schemas() empty vector
Protobuf descriptor search_protobuf_descriptor() nullptr
Protobuf dynamic message create_protobuf_message() nullptr
FlatBuffers BFBS schema search_flatbuffers_schema() nullptr
FlatBuffers parser create_flatbuffers_parser() nullptr
Plugin lifecycle
load .so --> factory ctor --> search/get_all --> create_message/parser --> dtor
| ^
v |
caches built lazily under an internal mutex of the implementation ----+

Concrete plugins normally derive from SchemaPluginBase, which already implements every method against a linked Protobuf descriptor pool plus the process-local FlatBuffers registry.