SUMO - Simulation of Urban MObility
MSVehicleDevice.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2007-2018 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 // Abstract in-vehicle device
18 /****************************************************************************/
19 #ifndef MSVehicleDevice_h
20 #define MSVehicleDevice_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
28 #include <string>
29 #include <vector>
30 #include <map>
31 #include <set>
32 #include <random>
35 #include "MSDevice.h"
36 
37 
38 // ===========================================================================
39 // class definitions
40 // ===========================================================================
55 class MSVehicleDevice : public MSMoveReminder, public MSDevice {
56 public:
62  MSVehicleDevice(SUMOVehicle& holder, const std::string& id) :
63  MSMoveReminder(id), MSDevice(id), myHolder(holder) {
64  }
65 
66 
68  virtual ~MSVehicleDevice() { }
69 
70 
75  inline SUMOVehicle& getHolder() const {
76  return myHolder;
77  }
78 
80  return myHolder.getNumericalID();
81  }
82 
83 protected:
86 
87 private:
90 
93 
94 };
95 
96 
97 #endif
98 
99 /****************************************************************************/
100 
virtual ~MSVehicleDevice()
Destructor.
SUMOVehicle & myHolder
The vehicle that stores the device.
MSVehicleDevice(SUMOVehicle &holder, const std::string &id)
Constructor.
MSVehicleDevice & operator=(const MSVehicleDevice &)
Invalidated assignment operator.
SUMOVehicle::NumericalID getNumericalID() const
Representation of a vehicle.
Definition: SUMOVehicle.h:60
Something on a lane to be noticed about vehicle movement.
SUMOVehicle & getHolder() const
Returns the vehicle that holds this device.
Abstract in-vehicle / in-person device.
Definition: MSDevice.h:63
virtual NumericalID getNumericalID() const =0
return the numerical ID which is only for internal usage
Abstract in-vehicle device.
long long int NumericalID
Definition: SUMOVehicle.h:62