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

Header probe that enables Protobuf-backed schema-plugin code when available. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Detailed Description

Header probe that enables Protobuf-backed schema-plugin code when available.

Unlike FlatBuffers, Protobuf already provides a process-wide registry of generated descriptors through google::protobuf::DescriptorPool::generated_pool(), so VLink does not need its own table for Protobuf schemas. This header exists purely to:

  • Centralise the protobuf reflection includes used by the schema plugin.
  • Probe for protobuf availability and expose a feature macro to the rest of the schema-plugin code.

Registration API surface:

Source API used Notes
Generated code DescriptorPool::generated_pool() Populated by Protobuf at startup
Schema plugin VLINK_HAS_SCHEMA_PLUGIN_PROTOBUF (defined below) Enables protobuf code paths
Example
#ifdef VLINK_HAS_SCHEMA_PLUGIN_PROTOBUF
auto* pool = google::protobuf::DescriptorPool::generated_pool();
if (auto* desc = pool->FindMessageTypeByName("demo.proto.PointCloud")) {
// ... reflectively walk the message ...
(void)desc;
}
#endif
Header probe that enables Protobuf-backed schema-plugin code when available.