10 #include "helicsCLI11.hpp"
12 #include "json/forwards.h"
21 std::vector<CLI::ConfigItem> from_config(std::istream& input)
const override final;
24 void skipJson(
bool skj =
true) { mSkipJson = skj; }
29 void promoteSection(std::string sectionName) { mPromoteSection = std::move(sectionName); }
32 bool mSkipJson{
false};
33 bool mFallbackToDefault{
false};
34 bool mThrowJsonErrors{
true};
35 std::string mPromoteSection;
37 std::vector<CLI::ConfigItem>
38 fromConfigInternal(Json::Value json,
39 const std::string& name = {},
40 const std::vector<std::string>& prefix = {})
const;
Define a JSON parser for the config files for CLI11.
Definition: helicsCLI11JsonConfig.hpp:19
void skipJson(bool skj=true)
skip checking the JSON and go directly to the TOML processing
Definition: helicsCLI11JsonConfig.hpp:24
void throwJsonErrors(bool the=true)
throw if the json processing produces errors
Definition: helicsCLI11JsonConfig.hpp:28
void fallbackToDefault(bool ftd=true)
if the specified section isn't available use the root section
Definition: helicsCLI11JsonConfig.hpp:26
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition: AsyncFedCallInfo.hpp:14
HelicsConfigJSON * addJsonConfig(CLI::App *app)
Add the HELICS JSON configuration processor to the app.
Definition: helicsCLI11JsonConfig.cpp:117