VLink 2.0.0
A high-performance communication middleware
载入中...
搜索中...
未找到
schema_plugin_base.h 文件参考

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

#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"
schema_plugin_base.h 的引用(Include)关系图:

浏览该文件的源代码.

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

命名空间

详细描述

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.