Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
MSXMLRawOut Class Reference

Realises dumping the complete network state. More...

#include <MSXMLRawOut.h>

Static Public Member Functions

static void write (OutputDevice &of, const MSEdgeControl &ec, SUMOTime timestep, int precision)
 Writes the complete network state of the given edges into the given device.
 
static void writeVehicle (OutputDevice &of, const MSBaseVehicle &veh)
 Writes the dump of the given vehicle into the given device.
 

Private Member Functions

 MSXMLRawOut (const MSXMLRawOut &)
 Invalidated copy constructor.
 
MSXMLRawOutoperator= (const MSXMLRawOut &)
 Invalidated assignment operator.
 

Static Private Member Functions

static void writeEdge (OutputDevice &of, const MSEdge &edge, SUMOTime timestep)
 Writes the dump of the given edge into the given device.
 
static void writeLane (OutputDevice &of, const MSLane &lane)
 Writes the dump of the given lane into the given device.
 
static void writeTransportable (OutputDevice &of, const MSTransportable *p, SumoXMLTag tag)
 write transportable
 

Detailed Description

Realises dumping the complete network state.

The class offers a static method, which writes the complete dump of the given network into the given OutputDevice.

Todo:
consider error-handling on write (using IOError)

Definition at line 52 of file MSXMLRawOut.h.

Constructor & Destructor Documentation

◆ MSXMLRawOut()

MSXMLRawOut::MSXMLRawOut ( const MSXMLRawOut )
private

Invalidated copy constructor.

Member Function Documentation

◆ operator=()

MSXMLRawOut & MSXMLRawOut::operator= ( const MSXMLRawOut )
private

Invalidated assignment operator.

◆ write()

void MSXMLRawOut::write ( OutputDevice of,
const MSEdgeControl ec,
SUMOTime  timestep,
int  precision 
)
static

Writes the complete network state of the given edges into the given device.

Opens the current time step, goes through the edges and writes each using writeEdge.

Parameters
[in]ofThe output device to use
[in]ecThe EdgeControl which holds the edges to write
[in]timestepThe current time step
[in]precisionThe output precision
Exceptions
IOErrorIf an error on writing occurs (!!! not yet implemented)

Definition at line 47 of file MSXMLRawOut.cpp.

References OutputDevice::closeTag(), MSEdgeControl::getEdges(), gPrecision, OutputDevice::openTag(), OutputDevice::setPrecision(), time2string(), and writeEdge().

Referenced by MSNet::writeOutput().

Here is the caller graph for this function:

◆ writeEdge()

void MSXMLRawOut::writeEdge ( OutputDevice of,
const MSEdge edge,
SUMOTime  timestep 
)
staticprivate

Writes the dump of the given edge into the given device.

If the edge is not empty or also empty edges shall be dumped, the edge description is opened and writeLane is called for each lane.

Parameters
[in]ofThe output device to use
[in]edgeThe edge to dump
Todo:
MSGlobals::gOmitEmptyEdgesOnDump should not be used; rather the according option read in write
Exceptions
IOErrorIf an error on writing occurs (!!! not yet implemented)

Definition at line 61 of file MSXMLRawOut.cpp.

References OutputDevice::closeTag(), MESegment::getCarNumber(), Named::getID(), MSEdge::getLanes(), MESegment::getNextSegment(), MELoop::getSegmentForEdge(), MSEdge::getSortedContainers(), MSEdge::getSortedPersons(), MSGlobals::gMesoNet, MSGlobals::gOmitEmptyEdgesOnDump, MSGlobals::gUseMesoSim, MSGlobals::gUsingInternalLanes, MSEdge::isNormal(), OutputDevice::openTag(), SUMO_TAG_CONTAINER, SUMO_TAG_PERSON, writeLane(), writeTransportable(), and MESegment::writeVehicles().

Referenced by write().

Here is the caller graph for this function:

◆ writeLane()

void MSXMLRawOut::writeLane ( OutputDevice of,
const MSLane lane 
)
staticprivate

Writes the dump of the given lane into the given device.

Opens the lane description and goes through all vehicles, calling writeVehicle for each.

Parameters
[in]ofThe output device to use
[in]laneThe lane to dump
Exceptions
IOErrorIf an error on writing occurs (!!! not yet implemented)

Definition at line 120 of file MSXMLRawOut.cpp.

References OutputDevice::closeTag(), Named::getID(), MSLane::getVehiclesSecure(), OutputDevice::openTag(), MSLane::releaseVehicles(), SUMO_ATTR_ID, OutputDevice::writeAttr(), and writeVehicle().

Referenced by writeEdge().

Here is the caller graph for this function:

◆ writeTransportable()

void MSXMLRawOut::writeTransportable ( OutputDevice of,
const MSTransportable p,
SumoXMLTag  tag 
)
staticprivate

write transportable

Definition at line 170 of file MSXMLRawOut.cpp.

References OutputDevice::closeTag(), MSTransportable::getAngle(), MSTransportable::getCurrentStageDescription(), MSTransportable::getEdgePos(), Named::getID(), GeomHelper::naviDegree(), OutputDevice::openTag(), SUMO_ATTR_ANGLE, SUMO_ATTR_ID, SUMO_ATTR_POSITION, and OutputDevice::writeAttr().

Referenced by writeEdge(), and writeVehicle().

Here is the caller graph for this function:

◆ writeVehicle()

void MSXMLRawOut::writeVehicle ( OutputDevice of,
const MSBaseVehicle veh 
)
static

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