Skip to content
Yaml_Conf.h 581 B
Newer Older
Valerio Pastore's avatar
Valerio Pastore committed
#pragma once

#include <Base_Configurator.h>
#include <yaml-cpp/yaml.h>
#include <unordered_map>

namespace inaf::oasbo::Configurators {

class YamlConfigurator: public BaseConfigurator {
protected:
	YAML::Node file;
	void load(std::string path);

public:
	std::string path;
	YamlConfigurator(std::string path);

	int readConfigFromSource() override;
	int readConfigFromSource(std::string target) override;
	int pushConfigToSource() override;
	int pushConfigToSource(std::string target) override;
	int insert(std::map<std::string, std::string>, std::string target) override;

};
}