VLink 2.0.0
A high-performance communication middleware
Loading...
Searching...
No Matches
schema_plugin_base.h File Reference

Default schema plugin implementation built around linked protobuf metadata and embedded BFBS blobs. More...

#include <algorithm>
#include <cctype>
#include <mutex>
#include <queue>
#include <string>
#include <string_view>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include "../base/helpers.h"
#include "./schema_plugin_interface.h"
#include "./flatbuffers_registry.h"
#include "./protobuf_registry.h"
Include dependency graph for schema_plugin_base.h:

Go to the source code of this file.

Classes

 Default mixed-schema plugin base class for Protobuf and FlatBuffers. More...

Namespaces

Detailed Description

Default schema plugin implementation built around linked protobuf metadata and embedded BFBS blobs.

SchemaPluginBase intentionally keeps the protobuf side aligned with the previous protobuf-only runtime behaviour:

  • protobuf descriptors are resolved directly from google::protobuf::DescriptorPool::generated_pool()
  • protobuf schema payloads are serialised from the linked FileDescriptor graph
  • dynamic protobuf messages are created via DynamicMessageFactory

FlatBuffers differs because there is no global descriptor pool. Therefore the concrete plugin/library must explicitly register compiled-in BFBS blobs into the process-local FlatbuffersRegistry through FlatbuffersRegistry::register_schema() or the convenience macro VLINK_REGISTER_FLATBUFFERS. A common pattern is to generate headers with flatc –bfbs-gen-embed and register the emitted *BinarySchema helpers at translation-unit scope inside the plugin/library.

This base class does not read VLINK_PROTO_DIR, VLINK_FBS_DIR, or any schema files from the file system.