From 581bea22683fb8ea098c5cc7415cec2d27f9450c Mon Sep 17 00:00:00 2001 From: Christoph Lehmann <christoph.lehmann@ufz.de> Date: Mon, 25 Jan 2016 14:00:46 +0100 Subject: [PATCH] [BL] removed unneeded functions --- BaseLib/ConfigTree.cpp | 30 ------------------------------ BaseLib/ConfigTree.h | 11 ----------- 2 files changed, 41 deletions(-) diff --git a/BaseLib/ConfigTree.cpp b/BaseLib/ConfigTree.cpp index f64dde1d3a9..d4fa42f02a7 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 42bc65481e6..5727f7549aa 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_ -- GitLab