Skip to main content

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:

  1. Wraps the typed generate function to accept a JSON string and GeneratorContext.
  2. Extracts the ParameterSchema from Params.
  3. Registers the generator into the global GeneratorRegistry.

Two overloads are provided:

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