SUMO - Simulation of Urban MObility
MSVTKExport Class Reference

Produce a VTK output to use with Tools like ParaView. More...

#include <MSVTKExport.h>

Collaboration diagram for MSVTKExport:
Collaboration graph

Static Public Member Functions

static void write (OutputDevice &of, SUMOTime timestep)
 Produce a VTK output to use with Tools like ParaView. More...
 

Private Member Functions

 MSVTKExport (const MSVTKExport &)
 Invalidated copy constructor. More...
 
MSVTKExportoperator= (const MSVTKExport &)
 Invalidated assignment operator. More...
 

Static Private Member Functions

static bool ctype_space (const char c)
 Checks if there is a whitespace. More...
 
static std::string getOffset (int nr)
 Get a String with the indexes of all vehicles (needed in the VTk File) More...
 
static std::vector< double > getPositions ()
 Get a Vector of the Positions (x,y,z) of each vehicle in the actual timestep. More...
 
static std::vector< double > getSpeed ()
 Get a Vector with the speed values of each vehicle in the actual timestep. More...
 
static std::string List2String (std::vector< double > input)
 Get a comma separated String from a Vector. More...
 
static std::string trim (std::string istring)
 Deletes the whitespaces at the end of a String. More...
 

Detailed Description

Produce a VTK output to use with Tools like ParaView.

The class offers a static method, which writes VTK Files for each timestep of the simulation, where at least one vehicle is present.

Todo:

Definition at line 57 of file MSVTKExport.h.

Constructor & Destructor Documentation

§ MSVTKExport()

MSVTKExport::MSVTKExport ( const MSVTKExport )
private

Invalidated copy constructor.

Member Function Documentation

§ ctype_space()

bool MSVTKExport::ctype_space ( const char  c)
staticprivate

Checks if there is a whitespace.

Definition at line 183 of file MSVTKExport.cpp.

Referenced by trim().

§ getOffset()

std::string MSVTKExport::getOffset ( int  nr)
staticprivate

Get a String with the indexes of all vehicles (needed in the VTk File)

Definition at line 169 of file MSVTKExport.cpp.

References trim().

Referenced by write().

§ getPositions()

std::vector< double > MSVTKExport::getPositions ( )
staticprivate

Get a Vector of the Positions (x,y,z) of each vehicle in the actual timestep.

Definition at line 123 of file MSVTKExport.cpp.

References MSNet::getInstance(), MSVehicle::getPosition(), MSNet::getVehicleControl(), MSVehicle::isOnRoad(), MSVehicleControl::loadedVehBegin(), MSVehicleControl::loadedVehEnd(), Position::x(), Position::y(), and Position::z().

Referenced by write().

§ getSpeed()

std::vector< double > MSVTKExport::getSpeed ( )
staticprivate

§ List2String()

std::string MSVTKExport::List2String ( std::vector< double >  input)
staticprivate

Get a comma separated String from a Vector.

Definition at line 149 of file MSVTKExport.cpp.

References trim().

Referenced by write().

§ operator=()

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

Invalidated assignment operator.

§ trim()

std::string MSVTKExport::trim ( std::string  istring)
staticprivate

Deletes the whitespaces at the end of a String.

Definition at line 191 of file MSVTKExport.cpp.

References ctype_space().

Referenced by getOffset(), and List2String().

§ write()

void MSVTKExport::write ( OutputDevice of,
SUMOTime  timestep 
)
static

Produce a VTK output to use with Tools like ParaView.

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

Definition at line 60 of file MSVTKExport.cpp.

References getOffset(), getPositions(), getSpeed(), and List2String().

Referenced by MSNet::writeOutput().


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