Mana
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
XML::Document Class Reference

A helper class for parsing an XML document, which also cleans it up again (RAII). More...

#include <xml.h>

Public Member Functions

 Document (const std::string &filename, bool useResman=true)
 Constructor that attempts to load the given file through the resource manager.
 
 ~Document ()
 Destructor.
 
Node rootNode () const
 Returns the root node of the document (or NULL if there was a load error).
 

Private Attributes

xmlDocPtr mDoc
 

Detailed Description

A helper class for parsing an XML document, which also cleans it up again (RAII).

Definition at line 189 of file xml.h.

Constructor & Destructor Documentation

◆ Document()

XML::Document::Document ( const std::string &  filename,
bool  useResman = true 
)

Constructor that attempts to load the given file through the resource manager.

Logs errors.

Definition at line 58 of file xml.cpp.

◆ ~Document()

XML::Document::~Document ( )

Destructor.

Frees the loaded XML file.

Definition at line 89 of file xml.cpp.

Member Function Documentation

◆ rootNode()

Node XML::Document::rootNode ( ) const
inline

Returns the root node of the document (or NULL if there was a load error).

Definition at line 213 of file xml.h.

Member Data Documentation

◆ mDoc

xmlDocPtr XML::Document::mDoc
private

Definition at line 210 of file xml.h.


The documentation for this class was generated from the following files: