2020-12-25 03:18:36 +01:00
|
|
|
#pragma once
|
2014-05-02 08:30:32 +02:00
|
|
|
|
2021-04-03 18:38:02 +02:00
|
|
|
#ifdef _MSC_VER
|
|
|
|
#pragma warning(push, 0)
|
2018-06-07 18:38:19 +02:00
|
|
|
#include <pugixml.hpp>
|
2021-04-03 18:38:02 +02: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 20:42:49 +01:00
|
|
|
#include <memory>
|
2016-04-02 22:28:53 +02:00
|
|
|
|
2014-05-02 08:30:32 +02:00
|
|
|
struct rXmlNode
|
|
|
|
{
|
|
|
|
rXmlNode();
|
2023-05-28 13:36:45 +02:00
|
|
|
rXmlNode(const pugi::xml_node& node);
|
2014-05-02 08:30:32 +02:00
|
|
|
std::shared_ptr<rXmlNode> GetChildren();
|
|
|
|
std::shared_ptr<rXmlNode> GetNext();
|
|
|
|
std::string GetName();
|
2023-05-28 13:36:45 +02:00
|
|
|
std::string GetAttribute(const std::string& name);
|
2014-05-02 08:30:32 +02:00
|
|
|
std::string GetNodeContent();
|
|
|
|
|
2021-04-03 18:38:02 +02:00
|
|
|
pugi::xml_node handle{};
|
2014-05-02 08:30:32 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
struct rXmlDocument
|
|
|
|
{
|
|
|
|
rXmlDocument();
|
2016-04-02 22:28:53 +02:00
|
|
|
rXmlDocument(const rXmlDocument& other) = delete;
|
|
|
|
rXmlDocument &operator=(const rXmlDocument& other) = delete;
|
2022-03-17 23:18:33 +01:00
|
|
|
pugi::xml_parse_result Read(const std::string& data);
|
|
|
|
virtual std::shared_ptr<rXmlNode> GetRoot();
|
2014-05-02 08:30:32 +02:00
|
|
|
|
2021-04-03 18:38:02 +02:00
|
|
|
pugi::xml_document handle{};
|
2016-04-16 23:21:22 +02:00
|
|
|
};
|