![]() |
helics
3.3.0
|
Go to the source code of this file.
Namespaces | |
helics | |
the main namespace for the helics co-simulation library User functions will be in the helics namespace with internal functions possible in a lower level namespace | |
Functions | |
bool | helics::fileops::hasJsonExtension (const std::string &jsonString) |
Json::Value | helics::fileops::loadJson (const std::string &jsonString) |
Json::Value | helics::fileops::loadJsonStr (std::string_view jsonString) |
helics::Time | helics::fileops::loadJsonTime (const Json::Value &timeElement, time_units defaultUnits) |
std::string | helics::fileops::getName (const Json::Value &element) |
std::string | helics::fileops::generateJsonString (const Json::Value &block) |
std::string | helics::fileops::JsonAsString (const Json::Value &element) |
std::string | helics::fileops::getOrDefault (const Json::Value &element, const std::string &key, std::string_view defVal) |
double | helics::fileops::getOrDefault (const Json::Value &element, const std::string &key, double defVal) |
bool | helics::fileops::getOrDefault (const Json::Value &element, const std::string &key, bool defVal) |
int64_t | helics::fileops::getOrDefault (const Json::Value &element, const std::string &key, int64_t defVal) |
bool | helics::fileops::callIfMember (const Json::Value &element, const std::string &key, const std::function< void(const std::string &, helics::Time)> &call) |
bool | helics::fileops::callIfMember (const Json::Value &element, const std::string &key, const std::function< void(const std::string &, bool)> &call) |
bool | helics::fileops::callIfMember (const Json::Value &element, const std::string &key, const std::function< void(const std::string &, int)> &call) |
bool | helics::fileops::callIfMember (const Json::Value &element, const std::string &key, const std::function< void(const std::string &)> &call) |
void | helics::fileops::replaceIfMember (const Json::Value &element, const std::string &key, helics::Time &timeVal) |
void | helics::fileops::replaceIfMember (const Json::Value &element, const std::string &key, std::string &sval) |
void | helics::fileops::replaceIfMember (const Json::Value &element, const std::string &key, bool &bval) |
void | helics::fileops::replaceIfMember (const Json::Value &element, const std::string &key, int &sval) |
void | helics::fileops::replaceIfMember (const Json::Value &element, const std::string &key, double &sval) |
functions related to loading and evaluating JSON files and helper functions for reading them using the jsoncpp library
std::string helics::fileops::generateJsonString | ( | const Json::Value & | block | ) |
generate a Json String
std::string helics::fileops::getName | ( | const Json::Value & | element | ) |
get a name or key from the element
bool helics::fileops::hasJsonExtension | ( | const std::string & | jsonString | ) |
check if the file has a valid JSON extension
Json::Value helics::fileops::loadJson | ( | const std::string & | jsonString | ) |
load a JSON string or filename that points to a JSON file and return a JSON::Value to the root object
Json::Value helics::fileops::loadJsonStr | ( | std::string_view | jsonString | ) |
load a JSON object in a string
helics::Time helics::fileops::loadJsonTime | ( | const Json::Value & | timeElement, |
time_units | defaultUnits | ||
) |
read a time from a JSON value element