hwdet::XMLOutputFile Class Reference

Class which represent simple XML files. This class Only allows writing to such files (no parsing). More...

#include <XMLFileOutput.h>


Public Member Functions

 XMLOutputFile (const Char *enc=NULL)
 Constructor.
 XMLOutputFile (XMLElement *root_elem, const Char *enc=DefaultEncoding)
 Constructor.
 ~XMLOutputFile (void)
 Destructor.
bool Write (OStream &stream) const
 Write data to the output stream.
bool Write (String file_name) const
 Write data to given external file.
void SetRootNode (XMLElement *elem)
 Set root node to given node.
void ClearRootNode (void)
 Remove root node and free used memory.
String GetEncoding (void) const
 Get character encoding of the output.

Private Attributes

XMLElementroot_node
 Root node of the file.
String encoding
 Encoding.


Detailed Description

Class which represent simple XML files. This class Only allows writing to such files (no parsing).


Constructor & Destructor Documentation

hwdet::XMLOutputFile::XMLOutputFile ( const Char enc = NULL  )  [inline]

Constructor.

Create XML file with given encoding.

Parameters:
enc Encoding of the file. If NULL, no encoding information is written to the output file.

hwdet::XMLOutputFile::XMLOutputFile ( XMLElement root_elem,
const Char enc = DefaultEncoding 
) [inline]

Constructor.

Create XML file with given encoding and root node.

Parameters:
enc Encoding of the file.
root_elem Root node of the file.

hwdet::XMLOutputFile::~XMLOutputFile ( void   )  [inline]

Destructor.

Memory used by the root node of the XML file is NOT freed.


Member Function Documentation

void hwdet::XMLOutputFile::ClearRootNode ( void   )  [inline]

Remove root node and free used memory.

String hwdet::XMLOutputFile::GetEncoding ( void   )  const [inline]

Get character encoding of the output.

Returns:
String with name of the output character encoding. Empty string if no encoding has been specified.

void hwdet::XMLOutputFile::SetRootNode ( XMLElement elem  )  [inline]

Set root node to given node.

Parameters:
elem New root node of the file.

bool hwdet::XMLOutputFile::Write ( String  file_name  )  const [inline]

Write data to given external file.

Parameters:
file_name Name of file to which data should be written. File will be created it it does not exists. Existing file will be overwritten.
Returns:
true if successfull, false otherwise.

bool hwdet::XMLOutputFile::Write ( OStream stream  )  const [inline]

Write data to the output stream.

Parameters:
stream Stream to which file will be written.
Returns:
true if successfull, false otherwise.


Field Documentation

String hwdet::XMLOutputFile::encoding [private]

Encoding.

XMLElement* hwdet::XMLOutputFile::root_node [private]

Root node of the file.


The documentation for this class was generated from the following file:
Generated on Tue Dec 19 17:43:53 2006 for Detector for Windows by  doxygen 1.4.7