15 #ifndef _DATAT_BITS_INCLUDE_TAG
16 #error Must only be included from sag_connectivity_cpp.hpp, use that instead
29 static std::string
getString(
const map_t &map,
const char *key) {
return getAs<std::string>(map, key); }
31 static std::string
getString(
const map_t &map,
const char *key,
const char *defaultValue) {
return getAs<std::string>(map, key, defaultValue); }
33 static std::string
getString(
const map_t &map,
const std::string &key) {
return getAs<std::string>(map, key.c_str()); }
35 static std::string
getString(
const map_t &map,
const std::string &key,
const std::string &defaultValue) {
return getAs<std::string>(map, key.c_str(), defaultValue); }
38 static int64_t
getInteger(
const map_t &map,
const char *key) {
return getAs<int64_t>(map, key); }
40 static int64_t
getInteger(
const map_t &map,
const char *key, int64_t defaultValue) {
return getAs<int64_t>(map, key, defaultValue); }
42 static int64_t
getInteger(
const map_t &map,
const std::string &key) {
return getAs<int64_t>(map, key.c_str()); }
44 static int64_t
getInteger(
const map_t &map,
const std::string &key, int64_t defaultValue) {
return getAs<int64_t>(map, key.c_str(), defaultValue); }
47 static double getDouble(
const map_t &map,
const char *key) {
return getAs<double>(map, key); }
49 static double getDouble(
const map_t &map,
const char *key,
double defaultValue) {
return getAs<double>(map, key, defaultValue); }
51 static double getDouble(
const map_t &map,
const std::string &key) {
return getAs<double>(map, key.c_str()); }
53 static double getDouble(
const map_t &map,
const std::string &key,
double defaultValue) {
return getAs<double>(map, key.c_str(), defaultValue); }
56 static bool getBoolean(
const map_t &map,
const char *key) {
return getAs<bool>(map, key); }
58 static bool getBoolean(
const map_t &map,
const char *key,
bool defaultValue) {
return getAs<bool>(map, key, defaultValue); }
60 static bool getBoolean(
const map_t &map,
const std::string &key) {
return getAs<bool>(map, key.c_str()); }
62 static bool getBoolean(
const map_t &map,
const std::string &key,
bool defaultValue) {
return getAs<bool>(map, key.c_str(), defaultValue); }
65 static const map_t &
getMap(
const map_t &map,
const char *key) {
return getAs<const map_t&>(map, key); }
67 static const map_t &
getMap(
const map_t &map,
const char *key,
const map_t &defaultValue) {
return getAs<const map_t&>(map, key, defaultValue); }
69 static const map_t &
getMap(
const map_t &map,
const std::string &key) {
return getAs<const map_t&>(map, key.c_str()); }
71 static const map_t &
getMap(
const map_t &map,
const std::string &key,
const map_t &defaultValue) {
return getAs<const map_t&>(map, key.c_str(), defaultValue); }
74 static const list_t &
getList(
const map_t &map,
const char *key) {
return getAs<const list_t&>(map, key); }
76 static const list_t &
getList(
const map_t &map,
const char *key,
const list_t &defaultValue) {
return getAs<const list_t&>(map, key, defaultValue); }
78 static const list_t &
getList(
const map_t &map,
const std::string &key) {
return getAs<const list_t&>(map, key.c_str()); }
80 static const list_t &
getList(
const map_t &map,
const std::string &key,
const list_t &defaultValue) {
return getAs<const list_t&>(map, key.c_str(), defaultValue); }
85 static T getAs(
const map_t &map,
const char *key);
88 static T getAs(
const map_t &map,
const char *key,
const T &def);
static const list_t & getList(const map_t &map, const char *key, const list_t &defaultValue)
Get a list value from the map, returning the given default if the key is not present.
Definition: map_helper.hpp:76
static const map_t & getMap(const map_t &map, const std::string &key)
Get a map value from the map, throwing if the key is not present.
Definition: map_helper.hpp:69
static int64_t getInteger(const map_t &map, const std::string &key)
Get an integer value from the map, throwing if the key is not present.
Definition: map_helper.hpp:42
static std::string getString(const map_t &map, const char *key, const char *defaultValue)
Get a string value from the map, returning the given default if the key is not present.
Definition: map_helper.hpp:31
A list class which implements many of the functions on std::vector.
Definition: list_t.hpp:34
A map class which implements many of the functions on std::map.
Definition: map_t.hpp:36
static std::string getString(const map_t &map, const char *key)
Get a string value from the map, throwing if the key is not present.
Definition: map_helper.hpp:29
static int64_t getInteger(const map_t &map, const char *key, int64_t defaultValue)
Get an integer value from the map, returning the given default if the key is not present.
Definition: map_helper.hpp:40
static const map_t & getMap(const map_t &map, const char *key)
Get a map value from the map, throwing if the key is not present.
Definition: map_helper.hpp:65
Helper class for extracting values from a string->data_t map_t in a type-safe way with error checking...
Definition: map_helper.hpp:24
static const list_t & getList(const map_t &map, const std::string &key, const list_t &defaultValue)
Get a list value from the map, returning the given default if the key is not present.
Definition: map_helper.hpp:80
static const list_t & getList(const map_t &map, const std::string &key)
Get a list value from the map, throwing if the key is not present.
Definition: map_helper.hpp:78
static double getDouble(const map_t &map, const std::string &key)
Get a double value from the map, throwing if the key is not present.
Definition: map_helper.hpp:51
static std::string getString(const map_t &map, const std::string &key, const std::string &defaultValue)
Get a string value from the map, returning the given default if the key is not present.
Definition: map_helper.hpp:35
static int64_t getInteger(const map_t &map, const char *key)
Get an integer value from the map, throwing if the key is not present.
Definition: map_helper.hpp:38
static std::string getString(const map_t &map, const std::string &key)
Get a string value from the map, throwing if the key is not present.
Definition: map_helper.hpp:33
static bool getBoolean(const map_t &map, const std::string &key, bool defaultValue)
Get a boolean value from the map, returning the given default if the key is not present.
Definition: map_helper.hpp:62
static bool getBoolean(const map_t &map, const char *key, bool defaultValue)
Get a boolean value from the map, returning the given default if the key is not present.
Definition: map_helper.hpp:58
static const map_t & getMap(const map_t &map, const char *key, const map_t &defaultValue)
Get a map value from the map, returning the given default if the key is not present.
Definition: map_helper.hpp:67
static const list_t & getList(const map_t &map, const char *key)
Get a list value from the map, throwing if the key is not present.
Definition: map_helper.hpp:74
static double getDouble(const map_t &map, const char *key, double defaultValue)
Get a double value from the map, returning the given default if the key is not present.
Definition: map_helper.hpp:49
static double getDouble(const map_t &map, const char *key)
Get a double value from the map, throwing if the key is not present.
Definition: map_helper.hpp:47
static int64_t getInteger(const map_t &map, const std::string &key, int64_t defaultValue)
Get an integer value from the map, returning the given default if the key is not present.
Definition: map_helper.hpp:44
static const map_t & getMap(const map_t &map, const std::string &key, const map_t &defaultValue)
Get a map value from the map, returning the given default if the key is not present.
Definition: map_helper.hpp:71
static double getDouble(const map_t &map, const std::string &key, double defaultValue)
Get a double value from the map, returning the given default if the key is not present.
Definition: map_helper.hpp:53
static bool getBoolean(const map_t &map, const std::string &key)
Get a boolean value from the map, throwing if the key is not present.
Definition: map_helper.hpp:60
static bool getBoolean(const map_t &map, const char *key)
Get a boolean value from the map, throwing if the key is not present.
Definition: map_helper.hpp:56