#include "config.h"
#include <fstream>
#include <cstdlib>
using namespace std;

void Config::dumpConfig(const std::string& path) const {
  ofstream output(path.c_str());
  for (const_iterator it=_register.begin(); it != _register.end(); ++it)
    output << it->first << ":" << it->second << endl;
}

string Config::getValue(const string& key) const {
  return _register[key];
}

void Config::setValue(const string& key, const string& value) {
  _register[key]=value;
}

Config GlobalConfig;
