9 #ifndef BLOCKFACTORY_CORE_PARAMETERS_H 10 #define BLOCKFACTORY_CORE_PARAMETERS_H 20 class ParameterMetadata;
41 #ifndef DOXYGEN_SHOULD_SKIP_THIS 43 std::unique_ptr<impl> pImpl;
103 template <
typename T>
116 template <
typename T>
128 template <
typename T>
140 template <
typename T>
195 double& param)
const;
199 std::string& param)
const;
208 std::vector<int>& param)
const;
210 std::vector<bool>& param)
const;
212 std::vector<double>& param)
const;
215 std::vector<std::string>& param)
const;
228 Parameters::storeParameter<int>(
const int& param,
const ParameterMetadata& paramMetadata);
230 Parameters::storeParameter<bool>(
const bool& param,
const ParameterMetadata& paramMetadata);
232 Parameters::storeParameter<double>(
const double& param,
236 bool Parameters::storeParameter<std::string>(
const std::string& param,
246 Parameters::storeParameter<int>(
const std::vector<int>& param,
249 Parameters::storeParameter<bool>(
const std::vector<bool>& param,
252 Parameters::storeParameter<double>(
const std::vector<double>& param,
255 Parameters::storeParameter<std::string>(
const std::vector<std::string>& param,
264 extern template bool Parameters::storeParameter<int>(
const Parameter<int>& parameter);
265 extern template bool Parameters::storeParameter<bool>(
const Parameter<bool>& parameter);
266 extern template bool Parameters::storeParameter<double>(
const Parameter<double>& parameter);
272 #endif // BLOCKFACTORY_CORE_PARAMETERS_H bool storeParameter(const T ¶m, const blockfactory::core::ParameterMetadata ¶mMetadata)
Store a scalar parameter.
ParamName getParamName(const ParamIndex &index) const
Get the name of a stored parameter from its index.
Class for storing a generic parameter.
Definition: Parameter.h:19
Parameters & operator=(const Parameters &other)
std::vector< Parameter< bool > > getBoolParameters() const
Get all the boolean parameters.
ParamIndex getParamIndex(const ParamName &name) const
Get the index of a stored parameter from its name.
bool existName(const ParamName &name) const
Check if a parameter with a given name is stored.
std::vector< Parameter< int > > getIntParameters() const
Get all the integer parameters.
Class for storing block's parameters.
Definition: Parameters.h:34
blockfactory::core::ParameterMetadata getParameterMetadata(const ParamName &name)
Get the metadata associated to a stored parameter.
int ParamIndex
Definition: Parameters.h:37
std::vector< Parameter< double > > getDoubleParameters() const
Get all the double parameters.
const std::string PARAM_INVALID_NAME
Definition: Parameters.h:23
std::vector< Parameter< std::string > > getStringParameters() const
Get all the string parameters.
const int PARAM_INVALID_INDEX
Definition: Parameters.h:22
unsigned getNumberOfParameters() const
Get the number of stored parameters.
std::string ParamName
Definition: Parameters.h:38
bool getParameter(const ParamName &name, T ¶m) const
Get a scalar parameter.