11#ifndef __FDP_DATA_IO_HXX__ 
   12#define __FDP_DATA_IO_HXX__ 
   16#include <ghc/filesystem.hpp> 
   20#include <yaml-cpp/yaml.h> 
   21#include <ghc/filesystem.hpp> 
   26#include "fdp/objects/metadata.hxx" 
   27#include "fdp/utilities/logging.hxx" 
   28#include "fdp/utilities/semver.hxx" 
   29#include "fdp/exceptions.hxx" 
   31namespace FairDataPipeline {
 
   48double read_point_estimate_from_toml(
const ghc::filesystem::path file_path);
 
   49double read_point_estimate_from_toml(
const ghc::filesystem::path file_path, 
const std::string &component);
 
   50toml::value read_parameter_from_toml(
const ghc::filesystem::path file_path,
 
   51                                     const std::string ¶meter);
 
   52toml::value read_parameter_from_toml(
const ghc::filesystem::path file_path,
 
   53                                     const std::string ¶meter,
 
   54                                     const std::string &component);
 
   55toml::value read_data_from_toml(
const ghc::filesystem::path file_path);
 
   56toml::value read_component_from_toml(
const ghc::filesystem::path file_path, 
const std::string &component);
 
   58ghc::filesystem::path write_toml_data(ghc::filesystem::path file_path, 
 
   59                                      const std::string &component,
 
   60                                      const toml::value &data);
 
   71ghc::filesystem::path write_toml_parameter(T &value,
 
   72                                      const std::string ¶meter,
 
   73                                      const std::string &component,
 
   74                                      const ghc::filesystem::path file_path
 
   77  const toml::value data_{
 
   78      {component, {{
"type", parameter}, {
"value", value}}}};
 
   79  return write_toml_data(file_path, component, data_);
 
   86write_point_estimate(T &value, 
const std::string &component,
 
   87                     const ghc::filesystem::path file_path) {
 
   88  return write_toml_parameter(value, 
"point-estimate",
 
   89                              component, file_path);
 
   92std::string get_first_component(
const ghc::filesystem::path &file_path);
 
   94bool component_exists(
const ghc::filesystem::path &file_path, 
const std::string &component);