SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MSDetectorFileOutput.h
Go to the documentation of this file.
1 /****************************************************************************/
10 // Base of value-generating classes (detectors)
11 /****************************************************************************/
12 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
13 // Copyright (C) 2001-2014 DLR (http://www.dlr.de/) and contributors
14 /****************************************************************************/
15 //
16 // This file is part of SUMO.
17 // SUMO is free software: you can redistribute it and/or modify
18 // it under the terms of the GNU General Public License as published by
19 // the Free Software Foundation, either version 3 of the License, or
20 // (at your option) any later version.
21 //
22 /****************************************************************************/
23 #ifndef MSDetectorFileOutput_h
24 #define MSDetectorFileOutput_h
25 
26 
27 // ===========================================================================
28 // included modules
29 // ===========================================================================
30 #ifdef _MSC_VER
31 #include <windows_config.h>
32 #else
33 #include <config.h>
34 #endif
35 
36 #include <string>
37 
38 #include <utils/common/SUMOTime.h>
40 #include <utils/common/Named.h>
41 
42 
43 // ===========================================================================
44 // class declarations
45 // ===========================================================================
46 class GUIDetectorWrapper;
47 
48 
49 // ===========================================================================
50 // class definitions
51 // ===========================================================================
56 };
57 
65 class MSDetectorFileOutput : public Named {
66 public:
68  MSDetectorFileOutput(const std::string& id) : Named(id) { }
69 
70 
72  virtual ~MSDetectorFileOutput() { }
73 
74 
77 
84  virtual void writeXMLOutput(OutputDevice& dev,
85  SUMOTime startTime, SUMOTime stopTime) = 0;
86 
87 
96  virtual void writeXMLDetectorProlog(OutputDevice& dev) const = 0;
97 
98 
106  virtual void reset() { }
107 
108 
113  virtual void detectorUpdate(const SUMOTime step) {
114  UNUSED_PARAMETER(step);
115  }
116 
117 
124  return 0;
125  }
126 
127 
128 private:
131 
134 
135 
136 };
137 
138 
139 #endif
140 
141 /****************************************************************************/
142 
MSDetectorFileOutput(const std::string &id)
Constructor.
virtual void reset()
Resets collected values.
#define UNUSED_PARAMETER(x)
Definition: StdDefs.h:38
virtual void detectorUpdate(const SUMOTime step)
Updates the detector (computes values)
virtual void writeXMLDetectorProlog(OutputDevice &dev) const =0
Open the XML-output.
MSDetectorFileOutput & operator=(const MSDetectorFileOutput &)
Invalidated assignment operator.
virtual ~MSDetectorFileOutput()
(virtual) destructor
Base class for objects which have an id.
Definition: Named.h:45
int SUMOTime
Definition: SUMOTime.h:43
virtual void writeXMLOutput(OutputDevice &dev, SUMOTime startTime, SUMOTime stopTime)=0
Write the generated output to the given device.
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:70
virtual GUIDetectorWrapper * buildDetectorGUIRepresentation()
Builds the graphical representation.
Base of value-generating classes (detectors)