OpenMiner/include/core/XMLFile.hpp
Quentin Bazin fb3f7f0501 Lot of changes. [...]
[Renderer] Deleted, code moved to Application.
[Transformable] Transformations are now applied to model matrix in applyTransform.
[ResourceHandler|TextureLoader|XMLFile] Added.
[Debug|Exception] Updated.
2018-06-21 05:45:17 +02:00

38 lines
848 B
C++

/*
* =====================================================================================
*
* Filename: XMLFile.hpp
*
* Description:
*
* Created: 17/01/2018 19:21:52
*
* Author: Quentin Bazin, <quent42340@gmail.com>
*
* =====================================================================================
*/
#ifndef XMLFILE_HPP_
#define XMLFILE_HPP_
#include <string>
#include <tinyxml2.h>
class XMLFile {
public:
XMLFile() = default;
XMLFile(const std::string &filename);
XMLFile(const XMLFile &) = default;
XMLFile(XMLFile &&) = default;
void load(const std::string &filename);
tinyxml2::XMLHandle FirstChildElement(const char *element) { return m_doc.FirstChildElement(element); }
private:
tinyxml2::XMLDocument m_xml;
tinyxml2::XMLHandle m_doc{m_xml};
};
#endif // XMLFILE_HPP_