R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BNeulandJsonHeader.h
Go to the documentation of this file.
1#pragma once
2#include <nlohmann/json.hpp>
3#include <nlohmann/json_fwd.hpp>
4
5namespace R3B::Neuland
6{
7 template <typename Option>
8 void to_json(nlohmann::ordered_json& json_obj, const Option& option)
9 {
10 json_obj =
11 nlohmann::ordered_json{ { "enable", option.enable }, { "read", option.read }, { "write", option.write } };
12 }
13
14 template <typename Option>
15 void from_json(const nlohmann::ordered_json& json_obj, Option& option)
16 {
17 json_obj.at("enable").get_to(option.enable);
18 json_obj.at("read").get_to(option.read);
19 json_obj.at("write").get_to(option.write);
20 }
21} // namespace R3B::Neuland
Simulation of NeuLAND Bar/Paddle.
void from_json(const nlohmann::ordered_json &json_obj, GeneratorFactory::Options &options)
void to_json(nlohmann::ordered_json &json_obj, const GeneratorFactory::Options &options)