#include "config.h" #include #include namespace pt = boost::property_tree; void Config::readConfigfile(std::string filename) { if (filename == "") { filename = default_filename; } pt::ptree tree; pt::read_xml(filename, tree); m_user = tree.get("webserver.user"); m_group = tree.get("webserver.group1"); } Config::Config(const std::string& filename) { readConfigfile(filename); } std::string Config::User() const { return m_user; } std::string Config::Group() const { return m_group; }