2014-05-02 06:30:32 +00:00
|
|
|
#pragma once
|
|
|
|
|
2016-04-08 18:17:24 +00:00
|
|
|
#ifndef PUGIXML_HEADER_ONLY
|
|
|
|
#define PUGIXML_HEADER_ONLY 1
|
|
|
|
#endif // !PUGIXML_HEADER_ONLY
|
|
|
|
#include "pugixml.hpp"
|
|
|
|
#undef PUGIXML_HEADER_ONLY
|
2016-04-02 20:28:53 +00:00
|
|
|
|
2014-05-02 06:30:32 +00:00
|
|
|
struct rXmlNode
|
|
|
|
{
|
|
|
|
rXmlNode();
|
2016-04-02 20:28:53 +00:00
|
|
|
rXmlNode(pugi::xml_node *);
|
2014-05-02 06:30:32 +00:00
|
|
|
rXmlNode(const rXmlNode& other);
|
|
|
|
rXmlNode &operator=(const rXmlNode& other);
|
|
|
|
~rXmlNode();
|
|
|
|
std::shared_ptr<rXmlNode> GetChildren();
|
|
|
|
std::shared_ptr<rXmlNode> GetNext();
|
|
|
|
std::string GetName();
|
|
|
|
std::string GetAttribute( const std::string &name);
|
|
|
|
std::string GetNodeContent();
|
2016-04-02 20:28:53 +00:00
|
|
|
void *AsVoidPtr();
|
2014-05-02 06:30:32 +00:00
|
|
|
|
2016-04-02 20:28:53 +00:00
|
|
|
pugi::xml_node *handle;
|
2014-05-02 06:30:32 +00:00
|
|
|
bool ownPtr;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct rXmlDocument
|
|
|
|
{
|
|
|
|
rXmlDocument();
|
2016-04-02 20:28:53 +00:00
|
|
|
rXmlDocument(const rXmlDocument& other) = delete;
|
|
|
|
rXmlDocument &operator=(const rXmlDocument& other) = delete;
|
2014-05-02 06:30:32 +00:00
|
|
|
~rXmlDocument();
|
|
|
|
void Load(const std::string & path);
|
|
|
|
std::shared_ptr<rXmlNode> GetRoot();
|
2016-04-02 20:28:53 +00:00
|
|
|
void *AsVoidPtr();
|
2014-05-02 06:30:32 +00:00
|
|
|
|
2016-04-02 20:28:53 +00:00
|
|
|
pugi::xml_document *handle;
|
2014-05-02 06:30:32 +00:00
|
|
|
};
|