#include <ticpp.h>
Inheritance diagram for ticpp::Document:
Public Member Functions | |
Document () | |
Default Constructor. | |
Document (TiXmlDocument *document) | |
Constructor. | |
Document (const char *documentName) | |
Constructor. | |
Document (const std::string &documentName) | |
Constructor. | |
std::string | GetAsString () |
Write the document to a string using formatted printing ("pretty print"). | |
void | LoadFile (TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING) |
Load a file using the current document value. | |
void | SaveFile () const |
Save a file using the current document value. | |
void | LoadFile (const std::string &filename, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING) |
Load a file using the given filename. | |
void | SaveFile (const std::string &filename) const |
Save a file using the given filename. |
ticpp::Document::Document | ( | ) |
Default Constructor.
Create an empty document, that has no name.
ticpp::Document::Document | ( | const std::string & | documentName | ) |
Constructor.
Create a document with a name. The name of the document is also the filename of the xml.
documentName | Name to set in the Document. |
std::string ticpp::Document::GetAsString | ( | ) |
Write the document to a string using formatted printing ("pretty print").
void ticpp::Document::LoadFile | ( | const std::string & | filename, | |
TiXmlEncoding | encoding = TIXML_DEFAULT_ENCODING | |||
) |
Load a file using the given filename.
Throws if load is unsuccessful.
filename | File to load. | |
encoding | Sets the documents encoding. |
Exception |
void ticpp::Document::LoadFile | ( | TiXmlEncoding | encoding = TIXML_DEFAULT_ENCODING |
) |
Load a file using the current document value.
Throws if load is unsuccessful.
encoding | Sets the documents encoding. |
Exception |
void ticpp::Document::SaveFile | ( | const std::string & | filename | ) | const |
Save a file using the given filename.
Throws if it can't save the file.
filename | File to save. |
Exception |
void ticpp::Document::SaveFile | ( | ) | const |
Save a file using the current document value.
Throws if it can't save the file.
Exception |