Eclipse SUMO - Simulation of Urban MObility
MSVTypeProbe.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
17 // Writes positions of vehicles that have a certain (named) type
18 /****************************************************************************/
19 #ifndef MSVTypeProbe_h
20 #define MSVTypeProbe_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
28 #include <string>
29 #include <utils/common/Command.h>
31 #include <utils/common/Named.h>
32 #include <utils/common/SUMOTime.h>
33 
34 
35 // ===========================================================================
36 // class definitions
37 // ===========================================================================
53 class MSVTypeProbe : public Named, public Command {
54 public:
62  MSVTypeProbe(const std::string& id, const std::string& vType,
63  OutputDevice& od, SUMOTime frequency);
64 
65 
67  virtual ~MSVTypeProbe();
68 
69 
70 
73 
84  SUMOTime execute(SUMOTime currentTime);
86 
87 
88 private:
90  std::string myVType;
91 
94 
97 
98 
99 private:
101  MSVTypeProbe(const MSVTypeProbe&);
102 
105 
106 
107 };
108 
109 #endif
110 
111 /****************************************************************************/
112 
SUMOTime.h
Named
Base class for objects which have an id.
Definition: Named.h:57
OutputDevice
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:64
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:35
MSVTypeProbe::myFrequency
SUMOTime myFrequency
The frequency of reporting.
Definition: MSVTypeProbe.h:96
MSVTypeProbe::execute
SUMOTime execute(SUMOTime currentTime)
Writes values into the given stream.
Definition: MSVTypeProbe.cpp:57
Named.h
OutputDevice.h
MSVTypeProbe::myVType
std::string myVType
The id of the vehicle type vehicles must have to be reported.
Definition: MSVTypeProbe.h:90
MSVTypeProbe::operator=
MSVTypeProbe & operator=(const MSVTypeProbe &)
Invalidated assignment operator.
MSVTypeProbe::~MSVTypeProbe
virtual ~MSVTypeProbe()
Destructor.
Definition: MSVTypeProbe.cpp:52
MSVTypeProbe::myOutputDevice
OutputDevice & myOutputDevice
The device to write into.
Definition: MSVTypeProbe.h:93
Command
Base (microsim) event class.
Definition: Command.h:53
config.h
Command.h
MSVTypeProbe::MSVTypeProbe
MSVTypeProbe(const std::string &id, const std::string &vType, OutputDevice &od, SUMOTime frequency)
Constructor.
Definition: MSVTypeProbe.cpp:43
MSVTypeProbe
Writes positions of vehicles that have a certain (named) type.
Definition: MSVTypeProbe.h:53