Newer
Older
#pragma once
#include <Base_Configurator.h>
#include <yaml-cpp/yaml.h>
#include <unordered_map>
namespace inaf::oasbo::Configurators {
/**
* @brief The YamlConfigurator class is a subclass of BaseConfigurator that provides functionality for reading and writing YAML configuration files.
* It inherits from the BaseConfigurator class. Check Base_Configurator.h for more information.
*/
class YamlConfigurator: public BaseConfigurator {
protected:
YAML::Node file;
void load(std::string path);
public:
std::string path;
/**
* @brief Constructs a YamlConfigurator object with the specified path to the YAML configuration file.
* @param path The path to the YAML configuration file.
*/
YamlConfigurator(std::string path);
int readConfigFromSource() override;
int insert(std::map<std::string, std::string>, std::string target) override;