![]() |
CommRaT 2.0.0
C++20 Real-Time Messaging Framework
|
Registry-wide introspection and schema export. More...
#include <commrat/introspection/introspection_helper.hpp>
Static Public Member Functions | |
| template<typename T , typename Writer = rfl::json::Writer> | |
| static std::string | export_as () |
| Export complete schema for a message type. | |
| template<typename Writer = rfl::json::Writer> | |
| static std::string | export_all () |
| Export complete schemas for all registered messages. | |
| template<typename Writer = rfl::json::Writer> | |
| static void | write_to_file (const std::string &filename) |
| Convenience: write all schemas to file. | |
Registry-wide introspection and schema export.
Provides methods to export complete message schemas (CommRaT metadata + SeRTial layout) for individual messages or all messages in a registry.
Format-agnostic - supports any rfl format (JSON, YAML, TOML, XML, etc.) via Writer type.
| UserRegistry | The CommRaT registry to introspect |
Usage:
Definition at line 61 of file introspection_helper.hpp.
|
inlinestatic |
Export complete schemas for all registered messages.
Returns array/collection of MessageSchema instances, one per registered type. Each contains full CommRaT metadata + SeRTial layout.
Useful for:
| Format | rfl format (json, yaml, toml, xml, etc.) |
Example Output (JSON):
| Writer | rfl Writer type (default: rfl::json::Writer) |
Definition at line 158 of file introspection_helper.hpp.
|
inlinestatic |
Export complete schema for a message type.
Exports MessageSchema<T, Registry> which includes:
| T | Payload type (must be registered in UserRegistry) |
| Format | rfl format (json, yaml, toml, xml, etc.) |
Example Output (JSON):
| T | Payload type to export schema for |
| Writer | rfl Writer type (default: rfl::json::Writer) |
Definition at line 118 of file introspection_helper.hpp.
|
inlinestatic |
Convenience: write all schemas to file.
Exports all message schemas and writes to specified file. File format determined by Format template parameter.
| Format | rfl format (json, yaml, toml, xml, etc.) |
| filename | Output file path |
Usage:
| Writer | rfl Writer type (default: rfl::json::Writer) |
| filename | Output file path |
Definition at line 190 of file introspection_helper.hpp.