#include <xmlfilewriter.h>
Inheritance diagram for GVectors::XMLWriter:

Public Member Functions | |
| XMLWriter (const std::string fn, bool tab=false) | |
| Constructor. | |
| XMLWriter (const XMLWriter &xfw) | |
| Copy constructor. | |
| virtual | ~XMLWriter () |
| Destructor. | |
| void | write (vslevel_t level, const vv_ref_t visualvector) |
| Write the item in XML format. | |
Protected Member Functions | |
| void | put_tabs (vslevel_t no) |
| Write tabs to file. | |
Private Attributes | |
| FILE * | file |
| Pointer to the 'object' controlling the stream. | |
| std::string | filename |
| The filename of the XML file. | |
| vslevel_t | lastlevel |
| Holds the last level written. | |
| bool | firstrun |
| Indicates whether or not XMLWriter::write() was called the first time. | |
| bool | tabify |
| Flag indicating whether or not output should be tabified. | |
See xmlfilereader.h for the DTD used.
| XMLWriter::XMLWriter | ( | const std::string | fn, | |
| bool | tab = false | |||
| ) |
Constructor.
| fn | A string holding the filename. | |
| tab | Set to true in order ot tabify the output. |
| GVEXMLFileWrite | Upon file i/o error. |
| XMLWriter::XMLWriter | ( | const XMLWriter & | xfw | ) |
Copy constructor.
| xfw | A const reference to a XMLWriter object. |
| GVEXMLFileWrite | Upon file i/o error. |
| XMLWriter::~XMLWriter | ( | ) | [virtual] |
Destructor. Writes the remaining closing tags and closes the file.
| void XMLWriter::put_tabs | ( | vslevel_t | no | ) | [protected] |
Puts the number of tabs specified to the file.
| no | The number of tabs to put on the output stream. |
| level | The level of the item in the tree. This value is not written to XML file. The nesting of the tags represents the level. | |
| visualvector | The VisualVector to store in the file. |
Implements GVectors::FileWriter.
FILE* GVectors::XMLWriter::file [private] |
Pointer to the 'object' controlling the stream obtained by calling fopen().
std::string GVectors::XMLWriter::filename [private] |
The filename of the XML file.
vslevel_t GVectors::XMLWriter::lastlevel [private] |
Holds the last level written. Used for writing closing tags.
bool GVectors::XMLWriter::firstrun [private] |
Indicates whether or not XMLWriter::write() was called the first time. Also used for writing closing tags.
bool GVectors::XMLWriter::tabify [private] |
When set to true, the output has tabs in order to indent, else, if set false, the output is pretty unpretty.
1.4.7