Eclipse SUMO - Simulation of Urban MObility
|
Abstract base class for output formatters. More...
#include <OutputFormatter.h>
Public Member Functions | |
virtual bool | closeTag (std::ostream &into, const std::string &comment="")=0 |
Closes the most recently opened tag and optinally add a comment. | |
virtual void | openTag (std::ostream &into, const std::string &xmlElement)=0 |
Opens an XML tag. | |
virtual void | openTag (std::ostream &into, const SumoXMLTag &xmlElement)=0 |
Opens an XML tag. | |
virtual void | writePadding (std::ostream &into, const std::string &val)=0 |
virtual void | writePreformattedTag (std::ostream &into, const std::string &val)=0 |
virtual bool | writeXMLHeader (std::ostream &into, const std::string &rootElement, const std::map< SumoXMLAttr, std::string > &attrs, bool includeConfig=true)=0 |
Writes an XML header with optional configuration. | |
virtual bool | wroteHeader () const =0 |
virtual | ~OutputFormatter () |
Destructor. | |
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 49 of file OutputFormatter.h.
|
inlinevirtual |
Destructor.
Definition at line 52 of file OutputFormatter.h.
|
pure virtual |
Closes the most recently opened tag and optinally add a comment.
[in] | into | The output stream to use |
Implemented in 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 PlainXMLFormatter.
Referenced by OutputDevice::openTag(), and 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 PlainXMLFormatter.
|
pure virtual |
Implemented in PlainXMLFormatter.
Referenced by OutputDevice::writePadding().
|
pure virtual |
Implemented in PlainXMLFormatter.
Referenced by OutputDevice::writePreformattedTag().
|
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 |
Check which parameter is used herein
Describe what is saved
Implemented in PlainXMLFormatter.
Referenced by OutputDevice::writeXMLHeader().
|
pure virtual |
Implemented in PlainXMLFormatter.
Referenced by OutputDevice::wroteHeader().