SUMO - Simulation of Urban MObility
|
Abstract base class for output formatters. More...
#include <OutputFormatter.h>
Public Member Functions | |
virtual bool | closeTag (std::ostream &into)=0 |
Closes the most recently opened tag. More... | |
virtual void | openTag (std::ostream &into, const std::string &xmlElement)=0 |
Opens an XML tag. More... | |
virtual void | openTag (std::ostream &into, const SumoXMLTag &xmlElement)=0 |
Opens an XML tag. More... | |
virtual bool | writeXMLHeader (std::ostream &into, const std::string &rootElement, const std::string &attrs="", const std::string &comment="")=0 |
Writes an XML header with optional configuration. More... | |
virtual | ~OutputFormatter () |
Destructor. More... | |
Abstract base class for output formatters.
OutputFormatter format XML like output into the output stream. There are only two implementation at the moment, "normal" XML and binary XML.
Definition at line 58 of file OutputFormatter.h.
|
inlinevirtual |
Destructor.
Definition at line 61 of file OutputFormatter.h.
|
pure virtual |
Closes the most recently opened tag.
[in] | into | The output stream to use |
Implemented in BinaryFormatter, and PlainXMLFormatter.
Referenced by OutputDevice::closeTag().
|
pure virtual |
Opens an XML tag.
An indentation, depending on the current xml-element-stack size, is written followed by the given xml element ("<" + xmlElement) The xml element is added to the stack, then.
[in] | into | The output stream to use |
[in] | xmlElement | Name of element to open |
Implemented in BinaryFormatter, and PlainXMLFormatter.
Referenced by OutputDevice::openTag().
|
pure virtual |
Opens an XML tag.
Helper method which finds the correct string before calling openTag.
[in] | into | The output stream to use |
[in] | xmlElement | Id of the element to open |
Implemented in BinaryFormatter, and PlainXMLFormatter.
|
pure virtual |
Writes an XML header with optional configuration.
If something has been written (myXMLStack is not empty), nothing is written and false returned.
[in] | into | The output stream to use |
[in] | rootElement | The root element to use |
[in] | attrs | Additional attributes to save within the rootElement |
[in] | comment | Additional comment (saved in front the rootElement) |
Check which parameter is used herein
Describe what is saved
Implemented in BinaryFormatter, and PlainXMLFormatter.
Referenced by OutputDevice::writeXMLHeader().