17 std::map<std::string, CompositionConverter> custom;
18 json.
get_if(custom,
"custom_axes");
19 composition_axes.
all_axes.insert(custom.begin(), custom.end());
21 if (json.
contains(
"standard_axes")) {
22 std::map<std::string, CompositionConverter> standard;
23 from_json(standard, json[
"standard_axes"]);
24 for (
auto const &el : standard) {
27 standard.insert(standard.begin(), standard.end());
31 json.
get_if(key,
"current_axes");
33 composition_axes.
select(key);
42 json[
"current_axes"] = composition_axes.
curr_key;
45 json[
"possible_axes"] = composition_axes.
all_axes;
48 json[
"enumerated"] = composition_axes.
enumerated;
static jsonParser object()
Returns an empty json object.
bool contains(const std::string &name) const
Return true if JSON object contains 'name'.
bool get_if(T &t, const std::string &key, Args &&... args) const
jsonParser & to_json(const ClexDescription &desc, jsonParser &json)
void from_json(ClexDescription &desc, const jsonParser &json)
bool has_current_axes() const
True if curr_key is set.
std::set< std::string > enumerated
void select(std::string key)
Set this->curr using key.
std::map< std::string, CompositionConverter > all_axes