2020-12-25 02:18:36 +00:00
|
|
|
#pragma once
|
2014-05-02 06:30:32 +00:00
|
|
|
|
2021-04-03 16:38:02 +00:00
|
|
|
#ifdef _MSC_VER
|
|
|
|
#pragma warning(push, 0)
|
2018-06-07 16:38:19 +00:00
|
|
|
#include <pugixml.hpp>
|
2021-04-03 16:38:02 +00:00
|
|
|
#pragma warning(pop)
|
|
|
|
#else
|
|
|
|
#pragma GCC diagnostic push
|
|
|
|
#pragma GCC diagnostic ignored "-Wall"
|
|
|
|
#pragma GCC diagnostic ignored "-Wextra"
|
|
|
|
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
|
|
|
#pragma GCC diagnostic ignored "-Weffc++"
|
|
|
|
#include <pugixml.hpp>
|
|
|
|
#pragma GCC diagnostic pop
|
|
|
|
#endif
|
|
|
|
|
2020-02-22 19:42:49 +00:00
|
|
|
#include <memory>
|
2016-04-02 20:28:53 +00:00
|
|
|
|
2014-05-02 06:30:32 +00:00
|
|
|
struct rXmlNode
|
|
|
|
{
|
|
|
|
rXmlNode();
|
2016-04-16 21:21:22 +00:00
|
|
|
rXmlNode(const pugi::xml_node &);
|
2014-05-02 06:30:32 +00:00
|
|
|
std::shared_ptr<rXmlNode> GetChildren();
|
|
|
|
std::shared_ptr<rXmlNode> GetNext();
|
|
|
|
std::string GetName();
|
|
|
|
std::string GetAttribute( const std::string &name);
|
|
|
|
std::string GetNodeContent();
|
|
|
|
|
2021-04-03 16:38:02 +00:00
|
|
|
pugi::xml_node handle{};
|
2014-05-02 06:30:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct rXmlDocument
|
|
|
|
{
|
|
|
|
rXmlDocument();
|
2016-04-02 20:28:53 +00:00
|
|
|
rXmlDocument(const rXmlDocument& other) = delete;
|
|
|
|
rXmlDocument &operator=(const rXmlDocument& other) = delete;
|
2017-09-03 19:29:20 +00:00
|
|
|
void Read(const std::string& data);
|
2014-05-02 06:30:32 +00:00
|
|
|
std::shared_ptr<rXmlNode> GetRoot();
|
|
|
|
|
2021-04-03 16:38:02 +00:00
|
|
|
pugi::xml_document handle{};
|
2016-04-16 21:21:22 +00:00
|
|
|
};
|