1 #ifndef PARAMETERTABLE_H 2 #define PARAMETERTABLE_H 5 #include <boost/interprocess/containers/flat_map.hpp> 45 const boost::interprocess::flat_map<std::string, double>&
getMap()
const {
mapify();
return table; }
50 mutable boost::interprocess::flat_map<std::string, double>
table;
51 mutable std::vector<std::pair<std::string, double> >
m_vector;
A list/table of parameter names and values.
const boost::interprocess::flat_map< std::string, double > & getMap() const
Parameter getParameter(const std::string &name) const
get a parameter by name. throw an exception of a well defined type if we don't have it ...
double getParameterValue(const std::string &name) const
get the value of a parameter. throw an exception of a well defined type if we don't have it ...
bool hasParameter(const std::string &name) const
is the named parameter in the table?
std::pair< std::string, double > Parameter
void mapify() const
Move the parameters from the vector to the map.
std::vector< std::pair< std::string, double > > m_vector
boost::interprocess::flat_map< std::string, double > table
void setParameter(Parameter p)
add a parameter to the table or, if already there, reset its value