VLink  2.0.0
A high-performance communication middleware
schema_plugin_interface.h 文件参考

Abstract contract for runtime Protobuf / FlatBuffers schema discovery plugins. 更多...

#include <string>
#include <vector>
#include "../base/plugin.h"
#include "../impl/types.h"
schema_plugin_interface.h 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

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

命名空间

 

详细描述

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.