Leosac  0.8.0
Open Source Access Control
XmlPropertyTree.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2014-2016 Leosac
3 
4  This file is part of Leosac.
5 
6  Leosac is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Affero General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  Leosac is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Affero General Public License for more details.
15 
16  You should have received a copy of the GNU Affero General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #include <boost/property_tree/ptree_fwd.hpp>
21 
22 #pragma once
23 
24 namespace Leosac
25 {
26 namespace Tools
27 {
32 boost::property_tree::ptree propertyTreeFromXmlFile(const std::string &path);
33 
37 void propertyTreeToXmlFile(const boost::property_tree::ptree &tree,
38  const std::string &path);
39 
43 std::string propertyTreeToXml(const boost::property_tree::ptree &tree);
44 
53 bool boost_text_archive_to_ptree(const std::string &data,
54  boost::property_tree::ptree &tree) noexcept;
55 }
56 }
Leosac::Tools::propertyTreeFromXmlFile
boost::property_tree::ptree propertyTreeFromXmlFile(const std::string &path)
Build a property tree from a xml file.
Definition: XmlPropertyTree.cpp:39
Leosac::Tools::propertyTreeToXmlFile
void propertyTreeToXmlFile(const boost::property_tree::ptree &tree, const std::string &path)
Write a property tree to an xml file.
Definition: XmlPropertyTree.cpp:58
Leosac
This is the header file for a generated source file, GitSHA1.cpp.
Definition: APIStatusCode.hpp:22
Leosac::Tools::boost_text_archive_to_ptree
bool boost_text_archive_to_ptree(const std::string &data, boost::property_tree::ptree &tree) noexcept
Convert a boost text archive, whose content is represented as a string (data) to a property tree.
Definition: XmlPropertyTree.cpp:89
Leosac::Tools::propertyTreeToXml
std::string propertyTreeToXml(const boost::property_tree::ptree &tree)
Convert a property tree to an xml formatted string.
Definition: XmlPropertyTree.cpp:67