20 #ifndef _PARAMETERSET_H_
21 #define _PARAMETERSET_H_
24 #include <boost/property_tree/ptree.hpp>
55 void set(
const std::string& key,
const std::string& value);
60 std::string
get(
const std::string& key)
const;
65 void setInt(
const std::string& key,
const int value);
70 int getInt(
const std::string& key)
const;
75 void setDouble(
const std::string& key,
const double value);
85 void setBool(
const std::string& key,
const bool value);
90 bool getBool(
const std::string& key)
const;
94 std::vector<std::string>
keys()
const;
105 boost::property_tree::ptree parameters;
Class which contains a list of key/value parameters for a mission.
Definition: ParameterSet.h:35
void set(const std::string &key, const std::string &value)
Sets the value of a key as a string.
void setBool(const std::string &key, const bool value)
Sets the value of a key as a boolean.
int getIterationCount() const
Gets the number of iterations that these parameters should be tested.
bool getBool(const std::string &key) const
Gets the value of a key as a boolean.
double getDouble(const std::string &key) const
Gets the value of a key as a double.
std::string toJson()
Returns a JSON representation of the parameter set.
void setIterationCount(const int iteration_count)
Sets the number of iterations that these parameters should be tested.
ParameterSet()
Constructs a parameter set.
int getInt(const std::string &key) const
Gets the value of a key as an integer.
std::string get(const std::string &key) const
Gets the value of a key as a string.
void setDouble(const std::string &key, const double value)
Sets the value of a key as a double.
void setInt(const std::string &key, const int value)
Sets the value of a key as an integer.
ParameterSet(const boost::property_tree::ptree parameters)
Constructs a parameter set using the provided property tree.
ParameterSet(const std::string &json)
Constructs a parameter set from the provided JSON string.
std::vector< std::string > keys() const
Gets the keys in the parameter set.