Neuralyzer::DataSynthesizer::RegisterGenerator
Neuralyzer::DataSynthesizer::RegisterGenerator
RAII helper for compile-time generator registration. More…
#include <Registration.hpp>
Public Functions
| Name | |
|---|---|
| RegisterGenerator(std::string const & name, std::function< DataTypeVariant(Params const &)> typed_func, GeneratorMetadata metadata) Register a generator that does not need DataManager context. |
|
| RegisterGenerator(std::string const & name, std::function< DataTypeVariant(Params const &, GeneratorContext const &)> typed_func, GeneratorMetadata metadata) Register a generator that needs DataManager context. |
Detailed Description
template <typename Params >
class Neuralyzer::DataSynthesizer::RegisterGenerator;RAII helper for compile-time generator registration.
Template Parameters:
- Params The generator’s parameter struct (must be reflect-cpp reflectable).
The constructor:
- Wraps the typed generate function to accept a JSON string and GeneratorContext.
- Extracts the ParameterSchema from Params.
- Registers the generator into the global GeneratorRegistry.
Two overloads are provided:
- For generators that don’t need context: DataTypeVariant(Params const &)
- For generators that need DataManager access: DataTypeVariant(Params const &, GeneratorContext const &)
Public Functions Documentation
function RegisterGenerator
inline RegisterGenerator(
std::string const & name,
std::function< DataTypeVariant(Params const &)> typed_func,
GeneratorMetadata metadata
)Register a generator that does not need DataManager context.
function RegisterGenerator
inline RegisterGenerator(
std::string const & name,
std::function< DataTypeVariant(Params const &, GeneratorContext const &)> typed_func,
GeneratorMetadata metadata
)Register a generator that needs DataManager context.
Updated on 2026-11-13 at 20:25:41 +0000