Many, many more comments
This commit is contained in:
@@ -7,23 +7,37 @@
|
||||
#include "jansson.h"
|
||||
#include "simulation/jansson_additionals.h"
|
||||
|
||||
// class to handle the json-parameter file and read it's data
|
||||
class Parameter {
|
||||
public:
|
||||
Parameter(std::string filename);
|
||||
~Parameter();
|
||||
|
||||
// read the value at the json path and return it as a double; defaults to 0.0
|
||||
double doubleValue(const json_path& path) const;
|
||||
// read the value at the json path and return it as a double; defaults to the default value
|
||||
double doubleValue(const json_path& path, double default_value) const;
|
||||
// read the value at the json path and return it as a int; defaults to 0
|
||||
int intValue(const json_path& path) const;
|
||||
// read the value at the json path and return it as a int; defaults to default value
|
||||
int intValue(const json_path& path, int default_value) const;
|
||||
// read the value at the json path and return it as a string; defaults to the empty string
|
||||
std::string stringValue(const json_path& path) const;
|
||||
// read the value at the json path and return it as a string; defaults to the default value
|
||||
std::string stringValue(const json_path& path,
|
||||
const std::string& default_value) const;
|
||||
// read the value at the json path and return it as a string;
|
||||
// the string "true" in the json file results in true, everything else in false
|
||||
bool boolValue(const json_path& path) const;
|
||||
// read the value at the json path and return it as a string;
|
||||
// the string "true" in the json file results in true, everything else in the default value
|
||||
bool boolValue(const json_path& path, bool default_value) const;
|
||||
|
||||
// check if "path" exists in the json-parameter file
|
||||
bool pathExists(const json_path& path) const;
|
||||
// return a pointer to the json_t object of the json-parameter_file
|
||||
json_t* jsonFile() const;
|
||||
// return a pointer to the json_t object of the group specified by "path"
|
||||
json_t* jsonObjectFromBase(const json_path& path) const;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user