42 #ifndef _DESIGN_PARAMETERS_HPP_ 43 #define _DESIGN_PARAMETERS_HPP_ 53 #define SCRIPT_FILENAME "__script_filename__" 64 using map_t = std::map<std::string, std::string>;
90 inline void assign(
const std::string& name,
const std::string&
value,
bool checkExisting)
92 if(checkExisting && parameter_values.find(name) == parameter_values.end())
94 THROW_ERROR(
"Parameter \"" + name +
"\" not yet defined");
98 parameter_values[name] =
value;
108 inline std::string
get_value(
const std::string& name)
const 110 if(parameter_values.find(name) == parameter_values.end())
112 THROW_ERROR(
"Parameter \"" + name +
"\" not yet defined");
114 return parameter_values.find(name)->second;
REF_FORWARD_DECL(DesignParameters)
std::map< std::string, std::string > map_t
Parameters map type.
CONSTREF_FORWARD_DECL(Parameter)
exceptions managed by PandA
redefinition of map to manage ordered/unordered structures
map_t parameter_values
Map between the name of the parameter and the corresponding string-based value.
void assign(const std::string &name, const std::string &value, bool checkExisting)
Assigns a value to a saved parameter.
#define THROW_ERROR(str_expr)
helper function used to throw an error in a standard way
Template definition of refcount.
std::string component_name
Name of the component.
DesignParametersRef clone() const
Returns a clone of the current parameter configuration.
std::string get_value(const std::string &name) const
Returns the value associated with a parameter name.
std::string chain_name
Name of the flow.