Skip to main content

Neuralyzer::DataSynthesizer::GeneratorRegistry

Neuralyzer::DataSynthesizer::GeneratorRegistry

Singleton registry for data generators. More…

#include <GeneratorRegistry.hpp>

Public Functions

Name
GeneratorRegistry() =default
GeneratorRegistry(GeneratorRegistry const & ) =delete
GeneratorRegistry & operator=(GeneratorRegistry const & ) =delete
GeneratorRegistry(GeneratorRegistry && ) =default
GeneratorRegistry & operator=(GeneratorRegistry && ) =default
void registerGenerator(std::string const & name, GeneratorFunction func, GeneratorMetadata metadata)
Register a generator.
std::optional< DataTypeVariant > generate(std::string const & name, std::string const & params_json, GeneratorContext const & ctx ={}) const
Execute a generator by name.
std::vector< std::string > listGenerators(std::string const & output_type) const
List all registered generator names for a given output type.
std::vector< std::string > listAllGenerators() const
List all registered generator names (all output types).
std::vector< std::string > listOutputTypes() const
List all unique output types that have at least one registered generator.
std::optional< ParameterSchema > getSchema(std::string const & name) const
Get the parameter schema for a generator.
std::optional< GeneratorMetadata > getMetadata(std::string const & name) const
Get the metadata for a generator.
bool hasGenerator(std::string const & name) const
Check if a generator is registered.
std::size_t size() const
Get the number of registered generators.
GeneratorRegistry & instance()
Get the global singleton instance.

Detailed Description

class Neuralyzer::DataSynthesizer::GeneratorRegistry;

Singleton registry for data generators.

Provides registration, lookup, and execution of generators keyed by (output_type, generator_name). Follows the same singleton pattern as TransformsV2’s ElementRegistry.

Public Functions Documentation

function GeneratorRegistry

GeneratorRegistry() =default

function GeneratorRegistry

GeneratorRegistry(
    GeneratorRegistry const & 
) =delete

function operator=

GeneratorRegistry & operator=(
    GeneratorRegistry const & 
) =delete

function GeneratorRegistry

GeneratorRegistry(
    GeneratorRegistry && 
) =default

function operator=

GeneratorRegistry & operator=(
    GeneratorRegistry && 
) =default

function registerGenerator

void registerGenerator(
    std::string const & name,
    GeneratorFunction func,
    GeneratorMetadata metadata
)

Register a generator.

Parameters:

  • name Unique generator name (e.g., “SineWave”)
  • func The generator function
  • metadata Metadata describing the generator

Precondition: No generator with the same name must already be registered.

function generate

std::optional< DataTypeVariant > generate(
    std::string const & name,
    std::string const & params_json,
    GeneratorContext const & ctx ={}
) const

Execute a generator by name.

Parameters:

  • name The generator name
  • params_json JSON string of generator-specific parameters
  • ctx Optional context providing DataManager access

Return: The generated data as a DataTypeVariant, or std::nullopt on failure

function listGenerators

std::vector< std::string > listGenerators(
    std::string const & output_type
) const

List all registered generator names for a given output type.

Parameters:

  • output_type Data type string (e.g., “AnalogTimeSeries”)

Return: Vector of generator names producing that output type

function listAllGenerators

std::vector< std::string > listAllGenerators() const

List all registered generator names (all output types).

function listOutputTypes

std::vector< std::string > listOutputTypes() const

List all unique output types that have at least one registered generator.

function getSchema

std::optional< ParameterSchema > getSchema(
    std::string const & name
) const

Get the parameter schema for a generator.

Parameters:

  • name The generator name

Return: The ParameterSchema, or std::nullopt if not found

function getMetadata

std::optional< GeneratorMetadata > getMetadata(
    std::string const & name
) const

Get the metadata for a generator.

Parameters:

  • name The generator name

Return: The GeneratorMetadata, or std::nullopt if not found

function hasGenerator

bool hasGenerator(
    std::string const & name
) const

Check if a generator is registered.

function size

std::size_t size() const

Get the number of registered generators.

function instance

static GeneratorRegistry & instance()

Get the global singleton instance.


Updated on 2026-11-13 at 20:25:41 +0000