12#include <nlohmann/json.hpp>
21namespace Experimental {
31 fJson = std::make_unique<Internal::RDF::RMetaDataJson>(*other.
fJson);
44 fJson->payload[key] = val;
52 fJson->payload[key] = val;
60 fJson->payload[key] = val;
69 return fJson->payload[key].dump();
75 if (!
fJson->payload.contains(key))
76 throw std::logic_error(
"No key with name " + key +
" in the metadata object.");
77 if (!
fJson->payload[key].is_number_integer())
78 throw std::logic_error(
"Metadata value found at key '" + key +
"' is not of type int.");
79 return fJson->payload[key].get<
int>();
86 if (!
fJson->payload.contains(key))
87 throw std::logic_error(
"No key with name " + key +
" in the metadata object.");
88 if (!
fJson->payload[key].is_number_float())
89 throw std::logic_error(
"Metadata value found at key '" + key +
"' is not of type double.");
90 return fJson->payload[key].get<
double>();
98 if (!
fJson->payload.contains(key))
99 throw std::logic_error(
"No key with name " + key +
" in the metadata object.");
100 if (!
fJson->payload[key].is_string())
101 throw std::logic_error(
"Metadata value found at key '" + key +
"' is not of type string.");
102 return fJson->payload[key].get<std::string>();
111 if (!
fJson->payload.contains(key))
113 if (!
fJson->payload[key].is_number_integer())
114 throw std::logic_error(
"Metadata value found at key '" + key +
"' is not of type int.");
115 return fJson->payload[key].get<
int>();
124 if (!
fJson->payload.contains(key))
126 if (!
fJson->payload[key].is_number_float())
127 throw std::logic_error(
"Metadata value found at key '" + key +
"' is not of type double.");
128 return fJson->payload[key].get<
double>();
136const std::string
RMetaData::GetS(
const std::string &key,
const std::string &defaultVal)
const
138 if (!
fJson->payload.contains(key))
140 if (!
fJson->payload[key].is_string())
141 throw std::logic_error(
"Metadata value found at key '" + key +
"' is not of type string.");
142 return fJson->payload[key].get<std::string>();
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...