Pugixml to replace wx/xml in rXML

Pugixml to replace wx/xml in rXML

Change reinterpret cast to static cast.

Pass name in pred by reference
This commit is contained in:
mpm11011 2016-04-02 16:28:53 -04:00
parent 62258a1f1a
commit b57daef75a
6 changed files with 65 additions and 56 deletions

View file

@ -1,9 +1,11 @@
#pragma once
#include <pugixml.hpp>
struct rXmlNode
{
rXmlNode();
rXmlNode(void *);
rXmlNode(pugi::xml_node *);
rXmlNode(const rXmlNode& other);
rXmlNode &operator=(const rXmlNode& other);
~rXmlNode();
@ -12,19 +14,21 @@ struct rXmlNode
std::string GetName();
std::string GetAttribute( const std::string &name);
std::string GetNodeContent();
void *AsVoidPtr();
void *handle;
pugi::xml_node *handle;
bool ownPtr;
};
struct rXmlDocument
{
rXmlDocument();
rXmlDocument(const rXmlDocument& other);
rXmlDocument &operator=(const rXmlDocument& other);
rXmlDocument(const rXmlDocument& other) = delete;
rXmlDocument &operator=(const rXmlDocument& other) = delete;
~rXmlDocument();
void Load(const std::string & path);
std::shared_ptr<rXmlNode> GetRoot();
void *AsVoidPtr();
void *handle;
pugi::xml_document *handle;
};