Class which contains a list of key/value parameters for a mission.
More...
#include <ParameterSet.h>
|
| ParameterSet () |
| Constructs a parameter set.
|
|
| ParameterSet (const boost::property_tree::ptree parameters) |
| Constructs a parameter set using the provided property tree. More...
|
|
| ParameterSet (const std::string &json) |
| Constructs a parameter set from the provided JSON string. More...
|
|
std::string | toJson () |
| Returns a JSON representation of the parameter set. More...
|
|
void | set (const std::string &key, const std::string &value) |
| Sets the value of a key as a string. More...
|
|
std::string | get (const std::string &key) const |
| Gets the value of a key as a string. More...
|
|
void | setInt (const std::string &key, const int value) |
| Sets the value of a key as an integer. More...
|
|
int | getInt (const std::string &key) const |
| Gets the value of a key as an integer. More...
|
|
void | setDouble (const std::string &key, const double value) |
| Sets the value of a key as a double. More...
|
|
double | getDouble (const std::string &key) const |
| Gets the value of a key as a double. More...
|
|
void | setBool (const std::string &key, const bool value) |
| Sets the value of a key as a boolean. More...
|
|
bool | getBool (const std::string &key) const |
| Gets the value of a key as a boolean. More...
|
|
std::vector< std::string > | keys () const |
| Gets the keys in the parameter set. More...
|
|
void | setIterationCount (const int iteration_count) |
| Sets the number of iterations that these parameters should be tested. More...
|
|
int | getIterationCount () const |
| Gets the number of iterations that these parameters should be tested. More...
|
|
Class which contains a list of key/value parameters for a mission.
Only supports a flat hierarchy.
malmo::ParameterSet::ParameterSet |
( |
const boost::property_tree::ptree |
parameters | ) |
|
Constructs a parameter set using the provided property tree.
- Parameters
-
parameters | A property tree containing the parameters. |
malmo::ParameterSet::ParameterSet |
( |
const std::string & |
json | ) |
|
Constructs a parameter set from the provided JSON string.
- Parameters
-
json | A JSON string describing the parameter set. |
std::string malmo::ParameterSet::get |
( |
const std::string & |
key | ) |
const |
Gets the value of a key as a string.
- Parameters
-
- Returns
- The value of the key.
bool malmo::ParameterSet::getBool |
( |
const std::string & |
key | ) |
const |
Gets the value of a key as a boolean.
- Parameters
-
- Returns
- The key value.
double malmo::ParameterSet::getDouble |
( |
const std::string & |
key | ) |
const |
Gets the value of a key as a double.
- Parameters
-
- Returns
- The key value.
int malmo::ParameterSet::getInt |
( |
const std::string & |
key | ) |
const |
Gets the value of a key as an integer.
- Parameters
-
- Returns
- The key value.
int malmo::ParameterSet::getIterationCount |
( |
| ) |
const |
Gets the number of iterations that these parameters should be tested.
- Returns
- The number of iterations.
std::vector<std::string> malmo::ParameterSet::keys |
( |
| ) |
const |
Gets the keys in the parameter set.
- Returns
- The keys as a list of strings.
void malmo::ParameterSet::set |
( |
const std::string & |
key, |
|
|
const std::string & |
value |
|
) |
| |
Sets the value of a key as a string.
- Parameters
-
key | The parameter name. |
value | The parameter value. |
void malmo::ParameterSet::setBool |
( |
const std::string & |
key, |
|
|
const bool |
value |
|
) |
| |
Sets the value of a key as a boolean.
- Parameters
-
key | The parameter name. |
value | The parameter value. |
void malmo::ParameterSet::setDouble |
( |
const std::string & |
key, |
|
|
const double |
value |
|
) |
| |
Sets the value of a key as a double.
- Parameters
-
key | The parameter name. |
value | The parameter value. |
void malmo::ParameterSet::setInt |
( |
const std::string & |
key, |
|
|
const int |
value |
|
) |
| |
Sets the value of a key as an integer.
- Parameters
-
key | The parameter name. |
value | The parameter value. |
void malmo::ParameterSet::setIterationCount |
( |
const int |
iteration_count | ) |
|
Sets the number of iterations that these parameters should be tested.
- Parameters
-
iteration_count | The number of iterations. |
std::string malmo::ParameterSet::toJson |
( |
| ) |
|
Returns a JSON representation of the parameter set.
- Returns
- A JSON string representing the parameter set.
The documentation for this class was generated from the following file: