|
VLink
2.0.0
A high-performance communication middleware
|
Process-local lookup table for compiled-in FlatBuffers BFBS reflection blobs. More...
#include <cstddef>#include <mutex>#include <shared_mutex>#include <string>#include <unordered_map>#include <vector>#include "../impl/types.h"Go to the source code of this file.
Process-local lookup table for compiled-in FlatBuffers BFBS reflection blobs.
Protobuf ships with a built-in process-wide registry of generated descriptors (google::protobuf::DescriptorPool::generated_pool()). FlatBuffers offers no such runtime pool, so VLink keeps a small singleton table that stores BFBS reflection blobs embedded inside the running binary. The schema plugin reads from this table when BagWriter or the proxy frontends need to attach FlatBuffers schemas to recorded URLs.
The registry is intentionally minimal and never touches the filesystem – it does not read VLINK_FBS_DIR / VLINK_PROTO_DIR and does not own the BFBS buffer memory. Three operations are supported:
| API | Purpose |
|---|---|
register_schema<BinarySchema>(name) | Register a generated *BinarySchema helper |
register_schema(name, bfbs_data, bfbs_size) | Register raw BFBS bytes |
search_schema(name) | Look up one entry by root type name |
get_all_schemas() | Enumerate every registered entry |
Type resolution flow:
* generated *BinarySchema --register_schema--> +-------------------+ * | BFBS map | * | (name -> Schema) | * user lookup (root type) --search_schema---> +-------------------+ --> SchemaData *