ticpp::Document Class Reference

Wrapper around TiXmlDocument. More...

#include <ticpp.h>

Inheritance diagram for ticpp::Document:

ticpp::NodeImp< TiXmlDocument > ticpp::Node ticpp::Base List of all members.

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.

Detailed Description

Wrapper around TiXmlDocument.


Constructor & Destructor Documentation

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.

Parameters:
documentName Name to set in the Document.


Member Function Documentation

std::string ticpp::Document::GetAsString (  ) 

Write the document to a string using formatted printing ("pretty print").

Returns:
the document as a formatted standard string.

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.

Parameters:
filename File to load.
encoding Sets the documents encoding.
See also:
TiXmlEncoding
Exceptions:
Exception 

void ticpp::Document::LoadFile ( TiXmlEncoding  encoding = TIXML_DEFAULT_ENCODING  ) 

Load a file using the current document value.

Throws if load is unsuccessful.

Parameters:
encoding Sets the documents encoding.
See also:
TiXmlEncoding
Exceptions:
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.

Parameters:
filename File to save.
Exceptions:
Exception 

void ticpp::Document::SaveFile (  )  const

Save a file using the current document value.

Throws if it can't save the file.

Exceptions:
Exception 


The documentation for this class was generated from the following file:
Generated on Thu Sep 7 14:23:33 2006 for TinyXml by  doxygen 1.4.7