1#ifndef DEPENDENT_BLOCK_MANAGER_H
2#define DEPENDENT_BLOCK_MANAGER_H
5#include <unordered_map>
42 std::unordered_map<
ParameterType, std::vector<std::string>> source_names,
58 std::unordered_set<ParamId> source_pids,
Defines classes used to store parameters and to build derived/dependent parameter blocks.
std::function< void(const BlockSrc &, std::shared_ptr< DependentBlock >)> DepUpdateFunc
Function type used to recompute a DependentBlock from its sources.
Defines parameters whose values are lazily computed from other parameters.
std::function< void(const ParamSrc &, std::shared_ptr< DependentParameter >)> DepParamUpdateFunc
Function signature used to recompute a DependentParameter.
Static class for handling dependent blocks and parameters across different Parameters instances.
static void update(const std::string &name, ParameterType src)
Manually triggers an update on a DependentBlock.
static void removeDependentBlock(const std::string &name, ParameterType src)
Removes a DependentBlock from a specified Parameters instance.
static void addDependentBlock(std::string name, std::unordered_map< ParameterType, std::vector< std::string > > source_names, ParameterType dest, DepUpdateFunc recalculateFunc)
Adds a DependentBlock with multiple sources coming from various Parameters instances.
static void addDependentParameter(ParamId pid, std::unordered_set< ParamId > source_pids, DepParamUpdateFunc recalculateFunc)
Adds a DependentParameter based on multiple source parameters.
Composite identifier for a single parameter.