SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
MSVTKExport.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // Produce a VTK output to use with Tools like ParaView
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
10 // Copyright (C) 2012-2016 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software: you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation, either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 #ifndef MSVTKExport_h
21 #define MSVTKExport_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include <utils/common/SUMOTime.h>
34 
35 
36 // ===========================================================================
37 // class declarations
38 // ===========================================================================
39 class OutputDevice;
40 class MSEdgeControl;
41 class MSEdge;
42 class MSLane;
43 
44 
45 // ===========================================================================
46 // class definitions
47 // ===========================================================================
57 class MSVTKExport {
58 public:
66  static void write(OutputDevice& of, SUMOTime timestep);
67 
68 private:
70  MSVTKExport(const MSVTKExport&);
71 
74 
76  static std::string trim(std::string istring);
77 
79  static bool ctype_space(const char c);
80 
82  static std::string List2String(std::vector<double> input);
83 
85  static std::vector<double> getSpeed();
86 
88  static std::vector<double> getPositions();
89 
91  static std::string getOffset(int nr);
92 
93 };
94 
95 
96 #endif
97 
98 /****************************************************************************/
static bool ctype_space(const char c)
Checks if there is a whitespace.
long long int SUMOTime
Definition: SUMOTime.h:43
Produce a VTK output to use with Tools like ParaView.
Definition: MSVTKExport.h:57
MSVTKExport(const MSVTKExport &)
Invalidated copy constructor.
static std::vector< double > getPositions()
Get a Vector of the Positions (x,y,z) of each vehicle in the actual timestep.
A road/street connecting two junctions.
Definition: MSEdge.h:80
Stores edges and lanes, performs moving of vehicle.
Definition: MSEdgeControl.h:74
static void write(OutputDevice &of, SUMOTime timestep)
Produce a VTK output to use with Tools like ParaView.
Definition: MSVTKExport.cpp:60
static std::vector< double > getSpeed()
Get a Vector with the speed values of each vehicle in the actual timestep.
Definition: MSVTKExport.cpp:99
static std::string List2String(std::vector< double > input)
Get a comma separated String from a Vector.
static std::string trim(std::string istring)
Deletes the whitespaces at the end of a String.
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
static std::string getOffset(int nr)
Get a String with the indexes of all vehicles (needed in the VTk File)
Representation of a lane in the micro simulation.
Definition: MSLane.h:79
MSVTKExport & operator=(const MSVTKExport &)
Invalidated assignment operator.