1 #ifndef PTREE_FILE_H_INCLUDED
2 #define PTREE_FILE_H_INCLUDED
22 #include <boost/property_tree/ptree.hpp>
23 #include <boost/property_tree/xml_parser.hpp>
36 static void Compress(
const std::string& in_path,
const std::string& out_path);
39 static void Decompress(
const std::string& in_path,
const std::string& out_path);
42 static bool IsGzipped(
const std::string& path);
60 static std::string GetLabel(
const std::string& path);
63 static void Read(
const std::string& path, boost::property_tree::ptree& pt);
66 static void ReadXml(
const std::string& path, boost::property_tree::ptree& pt);
69 static void ReadXmlGz(
const std::string& path, boost::property_tree::ptree& pt);
72 static void Write(
const std::string& path,
const boost::property_tree::ptree& pt);
75 static void WriteXml(
const std::string& path,
const boost::property_tree::ptree& pt);
78 static void WriteXmlGz(
const std::string& path,
const boost::property_tree::ptree& pt);
84 #endif // end-of-include-guard
Utility interface for dealing with ptree xml or xml.gz files.
static std::string GetBaseNameExcludingLabel(const std::string &path)
Base name excluding label (label encodes time step = chars from last "_" to first "...
static constexpr bool IsBoostGzipAvailable()
Signal availability of boost iostreams with gzip capability.
Namespace for the core simulator.
static std::string GetBaseNameIncludingLabel(const std::string &path)
Base name including label (label encodes time step = chars from last "_" to first "...
static bool IsPTreeFile(const std::string &path)
Indicates whether the file has the appropriate extension.
static std::string GetCompleteSuffix(const std::string &path)
Return complete suffix (everything following the first ".").