diff --git a/BaseLib/ConfigTree.cpp b/BaseLib/ConfigTree.cpp index f64dde1d3a913a94b0bde0828eda1d8a99de35bf..d4fa42f02a71baa6ca325da7049fd1ddabac7f6b 100644 --- a/BaseLib/ConfigTree.cpp +++ b/BaseLib/ConfigTree.cpp @@ -9,37 +9,7 @@ #include "ConfigTree.h" -#include <boost/property_tree/xml_parser.hpp> -#include <boost/property_tree/json_parser.hpp> - -#include <logog/include/logog.hpp> - // Explicitly instantiate the boost::property_tree::ptree which is a typedef to // the following basic_ptree. template class boost::property_tree::basic_ptree<std::string, std::string, std::less<std::string>>; - -namespace BaseLib -{ - -ConfigTree read_xml_config(std::string const& path) -{ - ConfigTree ptree; - read_xml(path, ptree, - boost::property_tree::xml_parser::no_comments | - boost::property_tree::xml_parser::trim_whitespace); - - DBUG("Project configuration from file \'%s\' read.", - path.c_str()); - - return ptree; -} - -std::string propertyTreeToString(ConfigTree const& tree) -{ - std::ostringstream ss; - boost::property_tree::write_json(ss, tree); - return ss.str(); -} - -} diff --git a/BaseLib/ConfigTree.h b/BaseLib/ConfigTree.h index 42bc65481e692f09393d792cf9fdb99fd8209d01..5727f7549aa05c09ddcbb703556095ec660a7fe6 100644 --- a/BaseLib/ConfigTree.h +++ b/BaseLib/ConfigTree.h @@ -10,20 +10,9 @@ #ifndef BASELIB_CONFIGTREE_H_ #define BASELIB_CONFIGTREE_H_ -#include <string> #include <boost/property_tree/ptree.hpp> extern template class boost::property_tree::basic_ptree< std::string, std::string, std::less<std::string>>; -namespace BaseLib -{ -using ConfigTree = boost::property_tree::ptree; - -boost::property_tree::ptree read_xml_config(std::string const& path); - -/// Returns the JSON-representation of the given boost::property_tree. -std::string propertyTreeToString(boost::property_tree::ptree const& tree); -} - #endif // BASELIB_CONFIGTREE_H_