Library of Assembled Shared Sources
lass::io::XmlOFile Class Reference

Output stream for writing a selection of geometric primitives to XML files. More...

#include <xml_o_file.h>

Inheritance diagram for lass::io::XmlOFile:
Collaboration diagram for lass::io::XmlOFile:

Detailed Description

Output stream for writing a selection of geometric primitives to XML files.

if you open a XmlOFile with iOpenMode (or without a second argument), the file is opened and that's it. Not automatic content is written to it:

{
XmlOFile a("foo.xml");
a << "spam\n"
}
// foo.xml:
// spam
{
XmlOFile b("bar.xml, std::ios::trunc);
b << "eggs\n"
}
// bar.xml:
// eggs
Output stream for writing a selection of geometric primitives to XML files.
Definition xml_o_file.h:104

However, if your second argument is the name of your root element, then a standard XML declaration will be written to it and the root element will be opened. When the file is closed, this root element will be closed automatically as well.

{
XmlOFile c("fun.xml", "root");
c << "ham\n"
}
// fun.xml:
// <?xml version="1.0"?>
// <root>
// ham
// </root>

Definition at line 103 of file xml_o_file.h.


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