How reflectcxx/reflectiontemplatelibrary-cpp works
RTL is a C++ run-time reflection library. Its principal workflow is to register user types and callables, discover them by name through CxxMirror, obtain metadata and build a signature-specific callable, then invoke it—optionally using RObject when the concrete target or return type is erased. The graph also captures object conversion and JSON output as supporting capabilities. The README documents these public flows; internal wiring beyond the sampled builder and access code is represented only where supported by that documentation.
Main entry points: CxxMirror.h CxxMirror · rtl_constructor.h Constructor API · forward_call.h Call dispatch · Builder.h Registration builders
Components 15
Registration
- Registration builders
ReflectionTemplateLib/rtl/builder/Builder.h
Discovery
- CxxMirror
ReflectionTemplateLib/rtl/inc/CxxMirror.h - Record metadata
ReflectionTemplateLib/rtl/inc/Record.hpp - Function metadata
ReflectionTemplateLib/rtl/inc/Function.hpp - Method metadata
ReflectionTemplateLib/rtl/inc/Method.hpp
Invocation
- Function callable API
ReflectionTemplateLib/rtl/inc/Function.hpp - Method callable API
ReflectionTemplateLib/rtl/inc/Method.hpp - Constructor API
ReflectionTemplateLib/rtl/rtl_constructor.h - Call dispatch
ReflectionTemplateLib/rtl/dispatch/forward_call.h
Objects and output
- RObject
ReflectionTemplateLib/rtl/inc/RObject.hpp - RObject construction
ReflectionTemplateLib/rtl/detail/inc/RObjectBuilder.hpp - Type conversion
ReflectionTemplateLib/rtl/detail/src/RObjectConverters_string.cpp - Mirror JSON output
ReflectionTemplateLib/rtl/src/CxxMirrorToJson.cpp
Other components
- C++ application
- User types and callables
Connections 23
- C++ application → Registration builders: registers via
- Registration builders → User types and callables: binds pointers
- Registration builders → CxxMirror: supplies registrations
- C++ application → CxxMirror: queries names
- CxxMirror → Record metadata: returns type metadata
- CxxMirror → Function metadata: returns function metadata
- Record metadata → Method metadata: looks up methods
- Record metadata → Constructor API: provides constructors
- Function metadata → Function callable API: builds typed callable
- Method metadata → Method callable API: builds typed callable
- C++ application → Function callable API: invokes callable
- C++ application → Method callable API: binds and invokes
- C++ application → Constructor API: constructs instance
- Function callable API → Call dispatch: dispatches call
- Method callable API → Call dispatch: dispatches call
- Constructor API → Call dispatch: dispatches construction
- Call dispatch → User types and callables: calls registered target
- Constructor API → RObject construction: creates managed object
- RObject construction → RObject: produces wrapper
- RObject → Type conversion: views or converts
- C++ application → RObject: uses erased values
- C++ application → Mirror JSON output: serializes mirror
- Mirror JSON output → CxxMirror: reads reflection data