Health-GPS 3.0.0.0
Global Health Policy Simulation model (Health-GPS)
Loading...
Searching...
No Matches
configuration_parsing.cpp File Reference
#include "configuration_parsing.h"
#include "configuration_parsing_helpers.h"
#include "jsonparser.h"
#include <cstdint>
#include <fmt/color.h>
#include <stdexcept>
#include <unordered_map>
Include dependency graph for configuration_parsing.cpp:

Namespaces

namespace  hgps
 Top-level namespace for Health-GPS Console host application.
 
namespace  hgps::input
 Data structures containing model parameters and configuration options.
 

Functions

nlohmann::json hgps::input::get (const nlohmann::json &j, const std::string &key)
 Load value from JSON, printing an error message if it fails.
 
void hgps::input::rebase_valid_path (std::filesystem::path &path, const std::filesystem::path &base_dir)
 Rebase path on base_dir.
 
bool hgps::input::rebase_valid_path_to (const nlohmann::json &j, const std::string &key, std::filesystem::path &out, const std::filesystem::path &base_dir) noexcept
 Get a valid path from a JSON object.
 
void hgps::input::rebase_valid_path_to (const nlohmann::json &j, const std::string &key, std::filesystem::path &out, const std::filesystem::path &base_dir, bool &success) noexcept
 Get a valid path from a JSON object.
 
FileInfo hgps::input::get_file_info (const nlohmann::json &node, const std::filesystem::path &base_dir)
 Load FileInfo from JSON.
 
SettingsInfo hgps::input::get_settings (const nlohmann::json &j)
 Load settings section of JSON.
 
BaselineInfo hgps::input::get_baseline_info (const nlohmann::json &j, const std::filesystem::path &base_dir)
 Load BaselineInfo from JSON.
 
void hgps::input::load_interventions (const nlohmann::json &running, Configuration &config)
 Load interventions from running section.
 
void hgps::input::check_version (const nlohmann::json &j)
 Check the schema version and throw if invalid.
 
void hgps::input::load_input_info (const nlohmann::json &j, Configuration &config)
 Load input dataset.
 
void hgps::input::load_modelling_info (const nlohmann::json &j, Configuration &config)
 Load ModellingInfo from JSON.
 
void hgps::input::load_running_info (const nlohmann::json &j, Configuration &config)
 Load running section of JSON object.
 
void hgps::input::load_output_info (const nlohmann::json &j, Configuration &config, const std::optional< std::string > &output_folder)
 Load output section of JSON object.