![]() |
SUMO - Simulation of Urban MObility
|
An output device that encapsulates cerr. More...
#include <OutputDevice_CERR.h>
Public Member Functions | |
OutputDevice member methods | |
virtual bool | ok () |
returns the information whether one can write into the device More... | |
void | close () |
Closes the device and removes it from the dictionary. More... | |
void | setPrecision (int precision=OUTPUT_ACCURACY) |
Sets the precison or resets it to default. More... | |
bool | writeXMLHeader (const std::string &rootElement, const std::string &attrs="", const std::string &comment="") |
Writes an XML header with optional configuration. More... | |
template<typename E > | |
bool | writeHeader (const SumoXMLTag &rootElement) |
OutputDevice & | openTag (const std::string &xmlElement) |
Opens an XML tag. More... | |
OutputDevice & | openTag (const SumoXMLTag &xmlElement) |
Opens an XML tag. More... | |
bool | closeTag () |
Closes the most recently opened tag. More... | |
void | lf () |
writes a line feed if applicable More... | |
bool | isBinary () const |
Returns whether we have a binary output. More... | |
template<typename T > | |
OutputDevice & | writeAttr (const SumoXMLAttr attr, const T &val) |
writes a named attribute More... | |
template<typename T > | |
OutputDevice & | writeAttr (const std::string &attr, const T &val) |
writes an arbitrary attribute More... | |
OutputDevice & | writeNonEmptyAttr (const SumoXMLAttr attr, const std::string &val) |
writes a string attribute only if it is not the empty string and not the string "default" More... | |
OutputDevice & | writePreformattedTag (const std::string &val) |
writes a preformatted tag to the device but ensures that any pending tags are closed More... | |
void | inform (const std::string &msg, const char progress=0) |
Retrieves a message to this device. More... | |
template<class T > | |
OutputDevice & | operator<< (const T &t) |
Abstract output operator. More... | |
Static Public Member Functions | |
static OutputDevice * | getDevice () |
Returns the single cerr instance. More... | |
static std::string | realString (const SUMOReal v, const int precision=OUTPUT_ACCURACY) |
Helper method for string formatting. More... | |
static access methods to OutputDevices | |
static OutputDevice & | getDevice (const std::string &name) |
Returns the described OutputDevice. More... | |
static bool | createDeviceByOption (const std::string &optionName, const std::string &rootElement="", const std::string &schemaFile="") |
Creates the device using the output definition stored in the named option. More... | |
static OutputDevice & | getDeviceByOption (const std::string &name) |
Returns the device described by the option. More... | |
static void | closeAll () |
Protected Member Functions | |
Methods that override/implement OutputDevice-methods | |
std::ostream & | getOStream () |
Returns the associated ostream. More... | |
virtual void | postWriteHook () |
Called after every write access. More... | |
Private Member Functions | |||
OutputDevice_CERR () | |||
Constructor
| |||
~OutputDevice_CERR () | |||
Destructor. More... | |||
Static Private Attributes | |
static OutputDevice * | myInstance = 0 |
my singular instance More... | |
An output device that encapsulates cerr.
Definition at line 44 of file OutputDevice_CERR.h.
|
private |
Constructor
IOError | Should not be thrown by this implementation. |
Definition at line 62 of file OutputDevice_CERR.cpp.
Referenced by getDevice().
|
private |
|
inherited |
Closes the device and removes it from the dictionary.
Definition at line 213 of file OutputDevice.cpp.
References OutputDevice::closeTag(), and OutputDevice::myOutputDevices.
Referenced by RONet::cleanup(), GUIDialog_ViewSettings::onCmdExportSetting(), GUIDialog_Breakpoints::onCmdSave(), GUIDialog_EditViewport::onCmdSave(), GUIParameterTracker::onCmdSave(), GUIDialog_ViewSettings::onCmdSaveDecals(), PCPolyContainer::save(), RODFDetectorCon::save(), GUISelectedStorage::save(), GNENet::saveAdditionals(), RODFDetectorCon::saveAsPOIs(), RODFDetectorCon::saveRoutes(), MSStateHandler::saveState(), GNEPOI::saveToFile(), GNEVariableSpeedSignal::writeAdditional(), NWWriter_XML::writeEdgesAndConnections(), RODFDetector::writeEmitterDefinition(), RODFDetectorCon::writeEmitterPOIs(), RODFDetectorCon::writeEmitters(), RODFDetectorCon::writeEndRerouterDetectors(), NWWriter_XML::writeJoinedJunctions(), NWWriter_SUMO::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), RODFDetector::writeSingleSpeedTrigger(), RODFDetectorCon::writeSpeedTrigger(), NWWriter_XML::writeStreetSigns(), NWWriter_XML::writeTrafficLights(), NWWriter_XML::writeTypes(), and RODFDetectorCon::writeValidationDetectors().
|
staticinherited |
Closes all registered devices
Definition at line 141 of file OutputDevice.cpp.
References MsgHandler::getErrorInstance(), MsgHandler::isRetriever(), OutputDevice::myOutputDevices, and WRITE_ERROR.
Referenced by SystemFrame::close(), and GUIRunThread::deleteSim().
|
inherited |
Closes the most recently opened tag.
The topmost xml-element from the stack is written into the stream as a closing element. Depending on the formatter used this may be something like "</" + element + ">" or "/>" or nothing at all.
Definition at line 253 of file OutputDevice.cpp.
References OutputFormatter::closeTag(), OutputDevice::getOStream(), OutputDevice::myFormatter, and OutputDevice::postWriteHook().
Referenced by MSDevice_Routing::adaptEdgeEfforts(), RORouteHandler::addStop(), MSBaseVehicle::addStops(), AGActivityTripWriter::addTrip(), AGActivityTripWriter::AGActivityTripWriter(), OutputDevice::close(), RORouteHandler::closeContainer(), computeRoutes(), MSRoute::dict_saveState(), MSVTypeProbe::execute(), MSDevice_Example::generateOutput(), MSDevice_Tripinfo::generateOutputForUnfinished(), RORouteHandler::myStartElement(), GUIDialog_ViewSettings::onCmdExportSetting(), GUIDialog_EditViewport::onCmdSave(), GUIDialog_ViewSettings::onCmdSaveDecals(), MSAbstractLaneChangeModel::primaryLaneChanged(), MSContainer::MSContainerStage_Driving::routeOutput(), MSPerson::MSPersonStage_Walking::routeOutput(), MSContainer::MSContainerStage_Tranship::routeOutput(), MSTransportable::Stage_Waiting::routeOutput(), MSPerson::MSPersonStage_Driving::routeOutput(), MSContainer::routeOutput(), MSPerson::routeOutput(), RODFRouteCont::save(), GUIPropertyScheme< T >::save(), RODFDetectorCon::save(), GUIVisualizationSettings::save(), ROVehicle::saveAsXML(), ROPerson::Ride::saveAsXML(), ROPerson::Walk::saveAsXML(), ROPerson::saveAsXML(), GUIDialog_ViewSettings::saveDecals(), MESegment::saveState(), MEVehicle::saveState(), MSVehicleControl::saveState(), MSLane::saveState(), MSVehicle::saveState(), MSVehicleControl::scheduleVehicleRemoval(), MSContainer::MSContainerStage_Driving::tripInfoOutput(), MSPerson::MSPersonStage_Walking::tripInfoOutput(), MSContainer::MSContainerStage_Tranship::tripInfoOutput(), MSTransportable::Stage_Waiting::tripInfoOutput(), MSPerson::MSPersonStage_Driving::tripInfoOutput(), MSContainer::tripInfoOutput(), MSPerson::tripInfoOutput(), MSQueueExport::write(), MSEmissionExport::write(), MSBatteryExport::write(), MSFCDExport::write(), MSFullExport::write(), MSXMLRawOut::write(), MSMeanData_Emissions::MSLaneMeanDataValues::write(), SUMOVTypeParameter::write(), MSMeanData_Amitran::MSLaneMeanDataValues::write(), MSMeanData_Harmonoise::MSLaneMeanDataValues::write(), MSMeanData_Net::MSLaneMeanDataValues::write(), MSInstantInductLoop::write(), ODMatrix::write(), SUMOVehicleParameter::Stop::write(), GNEDetectorExit::writeAdditional(), GNEDetectorEntry::writeAdditional(), GNEChargingStation::writeAdditional(), GNEDetectorE1::writeAdditional(), GNEVaporizer::writeAdditional(), GNERouteProbe::writeAdditional(), GNEDetectorE2::writeAdditional(), GNEVariableSpeedSignal::writeAdditional(), GNEBusStop::writeAdditional(), GNEContainerStop::writeAdditional(), GNEDetectorE3::writeAdditional(), GNECalibrator::writeAdditional(), GNERerouter::writeAdditional(), MSLink::writeApproaching(), NBSign::writeAsPOI(), NWWriter_SUMO::writeConnection(), NBRequest::writeCrossingResponse(), NWWriter_SUMO::writeDistrict(), MSQueueExport::writeEdge(), MSFullExport::writeEdge(), MSXMLRawOut::writeEdge(), NWWriter_SUMO::writeEdge(), MSMeanData::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), RODFDetector::writeEmitterDefinition(), RODFDetectorCon::writeEmitters(), ODMatrix::writeFlows(), NWWriter_OpenDrive::writeGeomPP3(), OutputDevice::writeHeader(), NWWriter_SUMO::writeInternalConnection(), NWWriter_SUMO::writeInternalEdges(), NWWriter_SUMO::writeInternalNodes(), writeInterval(), NWWriter_XML::writeJoinedJunctions(), NWWriter_SUMO::writeJunction(), MSQueueExport::writeLane(), MSFullExport::writeLane(), MSXMLRawOut::writeLane(), NWWriter_SUMO::writeLane(), NBRequest::writeLaneResponse(), GeoConvHelper::writeLocation(), NWWriter_SUMO::writeNetwork(), NWWriter_XML::writeNodes(), MSNet::writeOutput(), MSDevice_BTreceiver::BTreceiverUpdate::writeOutput(), NWWriter_SUMO::writeProhibitions(), NWWriter_SUMO::writeRoundabout(), RODFDetector::writeSingleSpeedTrigger(), RODFDetectorCon::writeSpeedTrigger(), MSFullExport::writeTLS(), NWWriter_SUMO::writeTrafficLights(), MSFCDExport::writeTransportable(), MSXMLRawOut::writeTransportable(), NBTypeCont::writeTypes(), RODFDetectorCon::writeValidationDetectors(), MSAmitranTrajectories::writeVehicle(), MSXMLRawOut::writeVehicle(), MSFullExport::writeVehicles(), GUIDialog_EditViewport::writeXML(), PointOfInterest::writeXML(), SUMO::Polygon::writeXML(), RORouteDef::writeXMLDefinition(), RORoute::writeXMLDefinition(), TrajectoriesHandler::writeXMLEmissions(), MSRouteProbe::writeXMLOutput(), and MSMeanData::writeXMLOutput().
|
staticinherited |
Creates the device using the output definition stored in the named option.
Creates and returns the device named by the option. Asks whether the option and retrieves the name from the option if so. Optionally the XML header gets written as well. Returns whether a device was created (option was set).
Please note, that we do not have to consider the "application base" herein, because this call is only used to get file names of files referenced within XML-declarations of structures which paths already is aware of the cwd.
[in] | optionName | The name of the option to use for retrieving the output definition |
[in] | rootElement | The root element to use (XML-output) |
[in] | schemaFile | The basename of the schema file to use (XML-output) |
IOError | If the output could not be built for any reason (error message is supplied) |
Definition at line 112 of file OutputDevice.cpp.
References OutputDevice::getDevice(), OptionsCont::getOptions(), and OutputDevice::writeXMLHeader().
Referenced by MSFrame::buildStreams(), MSDevice_Routing::buildVehicleDevices(), computeRoutes(), MSDevice_Vehroutes::init(), main(), and RONet::openOutput().
|
static |
Returns the single cerr instance.
Creates and returns the cerr device.
Definition at line 50 of file OutputDevice_CERR.cpp.
References myInstance, and OutputDevice_CERR().
Referenced by OutputDevice::getDevice().
|
staticinherited |
Returns the described OutputDevice.
Creates and returns the named device. "stdout" and "stderr" refer to the relevant console streams, "hostname:port" initiates socket connection. Otherwise a filename is assumed (where "nul" and "/dev/null" do what you would expect on both platforms). If there already is a device with the same name this one is returned.
[in] | name | The description of the output name/port/whatever |
IOError | If the output could not be built for any reason (error message is supplied) |
Definition at line 66 of file OutputDevice.cpp.
References TplConvert::_2int(), OutputDevice_COUT::getDevice(), getDevice(), OptionsCont::getOptions(), OutputDevice::getOStream(), OptionsCont::getString(), FileHelpers::isSocket(), OutputDevice::myOutputDevices, FileHelpers::prependToLastPathComponent(), and OutputDevice::setPrecision().
Referenced by MSDetectorControl::add(), NLDetectorBuilder::buildE2Detector(), NLDiscreteEventBuilder::buildSaveTLStateCommand(), NLDiscreteEventBuilder::buildSaveTLSwitchesCommand(), NLDiscreteEventBuilder::buildSaveTLSwitchStatesCommand(), NLDetectorBuilder::buildVTypeProbe(), OutputDevice::createDeviceByOption(), GUIDetectorBuilder::createInstantInductLoop(), NLDetectorBuilder::createInstantInductLoop(), OutputDevice::getDeviceByOption(), MsgHandler::initOutputOptions(), main(), MSCalibrator::MSCalibrator(), MsgHandler::MsgHandler(), GUIDialog_ViewSettings::onCmdExportSetting(), GUIDialog_Breakpoints::onCmdSave(), GUIDialog_EditViewport::onCmdSave(), GUIParameterTracker::onCmdSave(), GUIDialog_ViewSettings::onCmdSaveDecals(), RONet::openOutput(), GUILoadThread::run(), PCPolyContainer::save(), RODFDetectorCon::save(), GUISelectedStorage::save(), GNENet::saveAdditionals(), RODFDetectorCon::saveAsPOIs(), RODFDetectorCon::saveRoutes(), MSStateHandler::saveState(), GNEPOI::saveToFile(), GNEVariableSpeedSignal::writeAdditional(), NWWriter_XML::writeEdgesAndConnections(), RODFDetector::writeEmitterDefinition(), RODFDetectorCon::writeEmitterPOIs(), RODFDetectorCon::writeEmitters(), RODFDetectorCon::writeEndRerouterDetectors(), NWWriter_XML::writeJoinedJunctions(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_Amitran::writeNetwork(), NWWriter_OpenDrive::writeNetwork(), NWWriter_MATSim::writeNetwork(), NWWriter_SUMO::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), RODFDetector::writeSingleSpeedTrigger(), RODFDetectorCon::writeSpeedTrigger(), NWWriter_XML::writeStreetSigns(), NWWriter_XML::writeTrafficLights(), NWWriter_DlrNavteq::writeTrafficSignals(), NWWriter_XML::writeTypes(), and RODFDetectorCon::writeValidationDetectors().
|
staticinherited |
Returns the device described by the option.
Returns the device named by the option. If the option is unknown, unset or the device was not created before, InvalidArgument is thrown.
Please note, that we do not have to consider the "application base" herein.
[in] | name | The name of the option to use for retrieving the output definition |
IOError | If the output could not be built for any reason (error message is supplied) |
InvalidArgument | If the option with the given name does not exist |
Definition at line 131 of file OutputDevice.cpp.
References OutputDevice::getDevice(), OptionsCont::getOptions(), OptionsCont::getString(), and OutputDevice::myOutputDevices.
Referenced by MSDevice_Routing::adaptEdgeEfforts(), MSBaseVehicle::addStops(), computeRoutes(), MSTransportableControl::erase(), MSDevice_Emissions::generateOutput(), MSDevice_Vehroutes::generateOutput(), MSDevice_Example::generateOutput(), MSDevice_Tripinfo::generateOutput(), MSDevice_Tripinfo::generateOutputForUnfinished(), main(), RONet::openOutput(), MSAbstractLaneChangeModel::primaryLaneChanged(), MSVehicleControl::scheduleVehicleRemoval(), MSNet::writeOutput(), and MSDevice_BTreceiver::BTreceiverUpdate::writeOutput().
|
protectedvirtual |
Returns the associated ostream.
Implements OutputDevice.
Definition at line 71 of file OutputDevice_CERR.cpp.
|
inherited |
Retrieves a message to this device.
Implementation of the MessageRetriever interface. Writes the given message to the output device.
[in] | msg | The msg to write to the device |
Definition at line 267 of file OutputDevice.cpp.
References OutputDevice::getOStream(), and OutputDevice::postWriteHook().
Referenced by OutputDevice::writePreformattedTag().
|
inlineinherited |
Returns whether we have a binary output.
Definition at line 245 of file OutputDevice.h.
References OutputDevice::myAmBinary.
Referenced by computeRoutes(), and MSDevice_Vehroutes::generateOutput().
|
inlineinherited |
writes a line feed if applicable
Definition at line 235 of file OutputDevice.h.
References OutputDevice::getOStream(), and OutputDevice::myAmBinary.
Referenced by AGActivityTripWriter::AGActivityTripWriter(), MSContainer::routeOutput(), MSPerson::routeOutput(), GUIVisualizationSettings::save(), NWWriter_XML::writeEdgesAndConnections(), GeoConvHelper::writeLocation(), NWWriter_SUMO::writeNetwork(), NWWriter_SUMO::writeRoundabouts(), NWWriter_SUMO::writeTrafficLights(), and NBTypeCont::writeTypes().
|
virtualinherited |
returns the information whether one can write into the device
Definition at line 207 of file OutputDevice.cpp.
References OutputDevice::getOStream().
Referenced by SUMOVehicleParameter::parseArrivalLane(), SUMOVehicleParameter::parseArrivalPos(), SUMOVehicleParameter::parseArrivalSpeed(), SUMOVehicleParameter::parseDepartLane(), SUMOVehicleParameter::parseDepartPos(), SUMOVehicleParameter::parseDepartPosLat(), and SUMOVehicleParameter::parseDepartSpeed().
|
inherited |
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] | xmlElement | Name of element to open |
Definition at line 239 of file OutputDevice.cpp.
References OutputDevice::getOStream(), OutputDevice::myFormatter, and OutputFormatter::openTag().
Referenced by MSDevice_Routing::adaptEdgeEfforts(), RORouteHandler::addStop(), MSBaseVehicle::addStops(), AGActivityTripWriter::addTrip(), AGActivityTripWriter::AGActivityTripWriter(), MSPerson::MSPersonStage_Walking::beginEventOutput(), MSContainer::MSContainerStage_Tranship::beginEventOutput(), MSTransportable::Stage_Waiting::beginEventOutput(), MSTransportable::Stage_Driving::beginEventOutput(), computeRoutes(), MSRoute::dict_saveState(), MSPerson::MSPersonStage_Walking::endEventOutput(), MSContainer::MSContainerStage_Tranship::endEventOutput(), MSTransportable::Stage_Waiting::endEventOutput(), MSTransportable::Stage_Driving::endEventOutput(), MSVTypeProbe::execute(), MSDevice_Emissions::generateOutput(), MSDevice_Example::generateOutput(), MSDevice_Tripinfo::generateOutput(), RORouteHandler::myStartElement(), GUIDialog_ViewSettings::onCmdExportSetting(), GUIDialog_EditViewport::onCmdSave(), GUIDialog_ViewSettings::onCmdSaveDecals(), MSMeanData_Amitran::openInterval(), MSMeanData::openInterval(), MSAbstractLaneChangeModel::primaryLaneChanged(), MSContainer::MSContainerStage_Driving::routeOutput(), MSPerson::MSPersonStage_Walking::routeOutput(), MSContainer::MSContainerStage_Tranship::routeOutput(), MSTransportable::Stage_Waiting::routeOutput(), MSPerson::MSPersonStage_Driving::routeOutput(), MSContainer::routeOutput(), MSPerson::routeOutput(), RODFRouteCont::save(), GUIPropertyScheme< T >::save(), RODFDetectorCon::save(), GUIVisualizationSettings::save(), GNENet::saveAdditionals(), RODFDetectorCon::saveAsPOIs(), ROVehicle::saveAsXML(), ROPerson::Ride::saveAsXML(), ROPerson::Walk::saveAsXML(), ROPerson::saveAsXML(), GUIDialog_ViewSettings::saveDecals(), MESegment::saveState(), MSBaseVehicle::saveState(), MSVehicleControl::saveState(), MSLane::saveState(), MSContainer::MSContainerStage_Driving::tripInfoOutput(), MSPerson::MSPersonStage_Walking::tripInfoOutput(), MSContainer::MSContainerStage_Tranship::tripInfoOutput(), MSTransportable::Stage_Waiting::tripInfoOutput(), MSPerson::MSPersonStage_Driving::tripInfoOutput(), MSContainer::tripInfoOutput(), MSPerson::tripInfoOutput(), MSQueueExport::write(), MSBatteryExport::write(), MSEmissionExport::write(), MSFCDExport::write(), MSFullExport::write(), MSXMLRawOut::write(), SUMOVTypeParameter::write(), MSMeanData_Amitran::MSLaneMeanDataValues::write(), MSInstantInductLoop::write(), ODMatrix::write(), SUMOVehicleParameter::write(), SUMOVehicleParameter::Stop::write(), GNEDetectorEntry::writeAdditional(), GNEDetectorExit::writeAdditional(), GNEDetectorE1::writeAdditional(), GNEChargingStation::writeAdditional(), GNEVaporizer::writeAdditional(), GNERouteProbe::writeAdditional(), GNEDetectorE2::writeAdditional(), GNEBusStop::writeAdditional(), GNEVariableSpeedSignal::writeAdditional(), GNEContainerStop::writeAdditional(), GNEDetectorE3::writeAdditional(), GNECalibrator::writeAdditional(), GNERerouter::writeAdditional(), MSLink::writeApproaching(), NBSign::writeAsPOI(), NWWriter_SUMO::writeConnection(), NBRequest::writeCrossingResponse(), NWWriter_SUMO::writeDistrict(), MSQueueExport::writeEdge(), MSFullExport::writeEdge(), MSXMLRawOut::writeEdge(), NWWriter_SUMO::writeEdge(), MSMeanData::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), RODFDetector::writeEmitterDefinition(), RODFDetectorCon::writeEmitterPOIs(), RODFDetectorCon::writeEmitters(), RODFDetectorCon::writeEndRerouterDetectors(), ODMatrix::writeFlows(), NWWriter_OpenDrive::writeGeomPP3(), OutputDevice::writeHeader(), NWWriter_SUMO::writeInternalConnection(), NWWriter_SUMO::writeInternalEdges(), NWWriter_SUMO::writeInternalNodes(), writeInterval(), NWWriter_XML::writeJoinedJunctions(), NWWriter_SUMO::writeJunction(), MSQueueExport::writeLane(), MSFullExport::writeLane(), MSXMLRawOut::writeLane(), NWWriter_SUMO::writeLane(), NBRequest::writeLaneResponse(), GeoConvHelper::writeLocation(), NWWriter_OpenDrive::writeNetwork(), NWWriter_SUMO::writeNetwork(), NWWriter_XML::writeNodes(), MSNet::writeOutput(), MSDevice_BTreceiver::BTreceiverUpdate::writeOutput(), MSMeanData_Amitran::writePrefix(), MSMeanData::writePrefix(), NWWriter_SUMO::writeProhibitions(), NWWriter_SUMO::writeRoundabout(), RODFDetector::writeSingleSpeedTrigger(), RODFDetectorCon::writeSpeedTrigger(), MSFullExport::writeTLS(), NWWriter_SUMO::writeTrafficLights(), MSFCDExport::writeTransportable(), MSXMLRawOut::writeTransportable(), NBTypeCont::writeTypes(), RODFDetectorCon::writeValidationDetectors(), MSAmitranTrajectories::writeVehicle(), MSXMLRawOut::writeVehicle(), MSFullExport::writeVehicles(), GUIDialog_EditViewport::writeXML(), PointOfInterest::writeXML(), SUMO::Polygon::writeXML(), RORouteDef::writeXMLDefinition(), RORoute::writeXMLDefinition(), TrajectoriesHandler::writeXMLEmissions(), MEInductLoop::writeXMLOutput(), MSRouteProbe::writeXMLOutput(), and MSDevice_Vehroutes::writeXMLRoute().
|
inherited |
Opens an XML tag.
Helper method which finds the correct string before calling openTag.
[in] | xmlElement | Id of the element to open |
Definition at line 246 of file OutputDevice.cpp.
References OutputDevice::getOStream(), OutputDevice::myFormatter, and OutputFormatter::openTag().
|
inlineinherited |
Abstract output operator.
Definition at line 322 of file OutputDevice.h.
References OutputDevice::getOStream(), and OutputDevice::postWriteHook().
|
protectedvirtual |
Called after every write access.
Calls flush on stderr.
Reimplemented from OutputDevice.
Definition at line 77 of file OutputDevice_CERR.cpp.
|
staticinherited |
Helper method for string formatting.
[in] | v | The floating point value to be formatted |
[in] | precision | the precision to achieve |
Definition at line 171 of file OutputDevice.cpp.
Referenced by MSDevice_Emissions::generateOutput(), and MSMeanData_Emissions::MSLaneMeanDataValues::write().
|
inherited |
Sets the precison or resets it to default.
[in] | precision | The accuracy (number of digits behind '.') to set |
Definition at line 226 of file OutputDevice.cpp.
References OutputDevice::getOStream().
Referenced by MSVTypeProbe::execute(), OutputDevice::getDevice(), OutputDevice_String::OutputDevice_String(), PCPolyContainer::save(), MSBatteryExport::write(), MSEmissionExport::write(), MSFCDExport::write(), MSXMLRawOut::write(), NWWriter_XML::writeEdgesAndConnections(), GeoConvHelper::writeLocation(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), NWWriter_DlrNavteq::writeTrafficSignals(), MSFCDExport::writeTransportable(), and RORoute::writeXMLDefinition().
|
inlineinherited |
writes a named attribute
[in] | attr | The attribute (name) |
[in] | val | The attribute value |
Definition at line 257 of file OutputDevice.h.
References OutputDevice::getOStream(), OutputDevice::myAmBinary, PlainXMLFormatter::writeAttr(), and BinaryFormatter::writeAttr().
Referenced by MSDevice_Routing::adaptEdgeEfforts(), MSBaseVehicle::addStops(), AGActivityTripWriter::addTrip(), AGActivityTripWriter::AGActivityTripWriter(), MSPerson::MSPersonStage_Walking::beginEventOutput(), MSContainer::MSContainerStage_Tranship::beginEventOutput(), MSTransportable::Stage_Waiting::beginEventOutput(), MSTransportable::Stage_Driving::beginEventOutput(), computeRoutes(), MSRoute::dict_saveState(), MSPerson::MSPersonStage_Walking::endEventOutput(), MSContainer::MSContainerStage_Tranship::endEventOutput(), MSTransportable::Stage_Waiting::endEventOutput(), MSTransportable::Stage_Driving::endEventOutput(), MSVTypeProbe::execute(), MSDevice_Example::generateOutput(), MSDevice_Tripinfo::generateOutput(), GUIDialog_ViewSettings::onCmdExportSetting(), MSMeanData_Amitran::openInterval(), MSMeanData::openInterval(), RONet::openOutput(), MSAbstractLaneChangeModel::primaryLaneChanged(), GUIVisualizationTextSettings::print(), GUIVisualizationSizeSettings::print(), MSContainer::MSContainerStage_Driving::routeOutput(), MSPerson::MSPersonStage_Walking::routeOutput(), MSContainer::MSContainerStage_Tranship::routeOutput(), MSTransportable::Stage_Waiting::routeOutput(), MSPerson::MSPersonStage_Driving::routeOutput(), MSContainer::routeOutput(), MSPerson::routeOutput(), RODFRouteCont::save(), GUIPropertyScheme< T >::save(), RODFDetectorCon::save(), GUIVisualizationSettings::save(), RODFDetectorCon::saveAsPOIs(), ROVehicle::saveAsXML(), ROPerson::Ride::saveAsXML(), ROPerson::Walk::saveAsXML(), ROPerson::saveAsXML(), GUIDialog_ViewSettings::saveDecals(), MSStateHandler::saveState(), MESegment::saveState(), MEVehicle::saveState(), MSBaseVehicle::saveState(), MSVehicleControl::saveState(), MSLane::saveState(), MSVehicle::saveState(), MSContainer::MSContainerStage_Driving::tripInfoOutput(), MSPerson::MSPersonStage_Walking::tripInfoOutput(), MSContainer::MSContainerStage_Tranship::tripInfoOutput(), MSTransportable::Stage_Waiting::tripInfoOutput(), MSPerson::MSPersonStage_Driving::tripInfoOutput(), MSContainer::tripInfoOutput(), MSPerson::tripInfoOutput(), MSBatteryExport::write(), MSQueueExport::write(), MSEmissionExport::write(), MSFCDExport::write(), SUMOVTypeParameter::write(), MSMeanData_Amitran::MSLaneMeanDataValues::write(), MSMeanData_Harmonoise::MSLaneMeanDataValues::write(), MSMeanData_Net::MSLaneMeanDataValues::write(), MSInstantInductLoop::write(), ODMatrix::write(), SUMOVehicleParameter::write(), SUMOVehicleParameter::Stop::write(), GNEDetectorEntry::writeAdditional(), GNEDetectorExit::writeAdditional(), GNEDetectorE1::writeAdditional(), GNEChargingStation::writeAdditional(), GNEVaporizer::writeAdditional(), GNERouteProbe::writeAdditional(), GNEDetectorE2::writeAdditional(), GNEBusStop::writeAdditional(), GNEVariableSpeedSignal::writeAdditional(), GNEContainerStop::writeAdditional(), GNEDetectorE3::writeAdditional(), GNECalibrator::writeAdditional(), GNERerouter::writeAdditional(), MSLink::writeApproaching(), NBSign::writeAsPOI(), NWWriter_SUMO::writeConnection(), NBRequest::writeCrossingResponse(), ODMatrix::writeDefaultAttrs(), NWWriter_SUMO::writeDistrict(), MSFullExport::writeEdge(), NWWriter_SUMO::writeEdge(), MSMeanData::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), RODFDetector::writeEmitterDefinition(), RODFDetectorCon::writeEmitterPOIs(), RODFDetectorCon::writeEmitters(), RODFDetectorCon::writeEndRerouterDetectors(), ODMatrix::writeFlows(), NWWriter_OpenDrive::writeGeomPP3(), NWWriter_SUMO::writeInternalConnection(), NWWriter_SUMO::writeInternalEdges(), NWWriter_SUMO::writeInternalNodes(), writeInterval(), NWWriter_XML::writeJoinedJunctions(), NWWriter_SUMO::writeJunction(), MSQueueExport::writeLane(), MSFullExport::writeLane(), NWWriter_SUMO::writeLane(), NBRequest::writeLaneResponse(), GeoConvHelper::writeLocation(), NWWriter_SUMO::writeNetwork(), NWWriter_XML::writeNodes(), OutputDevice::writeNonEmptyAttr(), MSNet::writeOutput(), MSDevice_BTreceiver::BTreceiverUpdate::writeOutput(), writePermissions(), NWFrame::writePositionLong(), writePreferences(), MSMeanData_Amitran::writePrefix(), MSMeanData::writePrefix(), NWWriter_SUMO::writeProhibitions(), NWWriter_SUMO::writeRoundabout(), RODFDetector::writeSingleSpeedTrigger(), RODFDetectorCon::writeSpeedTrigger(), MSFullExport::writeTLS(), NWWriter_SUMO::writeTrafficLights(), MSFCDExport::writeTransportable(), MSXMLRawOut::writeTransportable(), NBTypeCont::writeTypes(), RODFDetectorCon::writeValidationDetectors(), MSAmitranTrajectories::writeVehicle(), MSXMLRawOut::writeVehicle(), MSFullExport::writeVehicles(), GUIDialog_EditViewport::writeXML(), PointOfInterest::writeXML(), SUMO::Polygon::writeXML(), RORouteDef::writeXMLDefinition(), RORoute::writeXMLDefinition(), TrajectoriesHandler::writeXMLEmissions(), and MEInductLoop::writeXMLOutput().
|
inlineinherited |
writes an arbitrary attribute
[in] | attr | The attribute (name) |
[in] | val | The attribute value |
Definition at line 274 of file OutputDevice.h.
References OutputDevice::getOStream(), OutputDevice::myAmBinary, PlainXMLFormatter::writeAttr(), and BinaryFormatter::writeAttr().
|
inlineinherited |
Definition at line 189 of file OutputDevice.h.
References OutputDevice::closeTag(), OutputDevice::getOStream(), OutputDevice::myAmBinary, OutputDevice::myFormatter, and OutputDevice::openTag().
Referenced by RONet::openOutput(), and MSStateHandler::saveState().
|
inlineinherited |
writes a string attribute only if it is not the empty string and not the string "default"
[in] | attr | The attribute (name) |
[in] | val | The attribute value |
Definition at line 290 of file OutputDevice.h.
References OutputDevice::writeAttr().
Referenced by SUMOVehicleParameter::write(), and RODFDetector::writeEmitterDefinition().
|
inlineinherited |
writes a preformatted tag to the device but ensures that any pending tags are closed
[in] | val | The preformatted data |
Definition at line 303 of file OutputDevice.h.
References OutputDevice::getOStream(), OutputDevice::inform(), OutputDevice::myFormatter, and OutputFormatter::writePreformattedTag().
Referenced by RONet::saveAndRemoveRoutesUntil().
|
inherited |
Writes an XML header with optional configuration.
If something has been written (myXMLStack is not empty), nothing is written and false returned.
[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
Definition at line 232 of file OutputDevice.cpp.
References OutputDevice::getOStream(), OutputDevice::myFormatter, and OutputFormatter::writeXMLHeader().
Referenced by Command_SaveTLSState::Command_SaveTLSState(), Command_SaveTLSSwitches::Command_SaveTLSSwitches(), Command_SaveTLSSwitchStates::Command_SaveTLSSwitchStates(), OutputDevice::createDeviceByOption(), MSCalibrator::MSCalibrator(), MSVTypeProbe::MSVTypeProbe(), PCPolyContainer::save(), RODFDetectorCon::save(), RODFDetectorCon::saveAsPOIs(), RODFDetectorCon::saveRoutes(), GNEPOI::saveToFile(), NWWriter_XML::writeEdgesAndConnections(), RODFDetector::writeEmitterDefinition(), RODFDetectorCon::writeEmitterPOIs(), RODFDetectorCon::writeEmitters(), RODFDetectorCon::writeEndRerouterDetectors(), NWWriter_XML::writeJoinedJunctions(), NWWriter_SUMO::writeNetwork(), NWWriter_XML::writeNodes(), RODFDetector::writeSingleSpeedTrigger(), RODFDetectorCon::writeSpeedTrigger(), NWWriter_XML::writeStreetSigns(), NWWriter_XML::writeTrafficLights(), NWWriter_XML::writeTypes(), RODFDetectorCon::writeValidationDetectors(), MEInductLoop::writeXMLDetectorProlog(), MSRouteProbe::writeXMLDetectorProlog(), MS_E2_ZS_CollectorOverLanes::writeXMLDetectorProlog(), MSInstantInductLoop::writeXMLDetectorProlog(), MSMeanData_Amitran::writeXMLDetectorProlog(), MSE2Collector::writeXMLDetectorProlog(), MSInductLoop::writeXMLDetectorProlog(), MSE3Collector::writeXMLDetectorProlog(), and MSMeanData::writeXMLDetectorProlog().
|
staticprivate |
my singular instance
Definition at line 84 of file OutputDevice_CERR.h.
Referenced by getDevice(), and ~OutputDevice_CERR().