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.
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 LoadFile (const char *filename, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)
void SaveFile (const std::string &filename) const
 Save a file using the given filename.
void Parse (const std::string &xml, bool throwIfParseError=true, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)
 Parse the given xml data.


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

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

Save a file using the current document value.

Throws if it can't save the file.

Exceptions:
Exception 

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 ( const char *  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::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::Parse ( const std::string &  xml,
bool  throwIfParseError = true,
TiXmlEncoding  encoding = TIXML_DEFAULT_ENCODING 
)

Parse the given xml data.

Parameters:
xml Xml to parse.
throwIfParseError [DEF] If true, throws when there is a parse error.
encoding Sets the documents encoding.
Exceptions:
Exception 


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

Generated on Sun Feb 15 23:12:14 2009 for TinyXml by  doxygen 1.5.6