SUMO - Simulation of Urban MObility
MSPersonDevice.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-person device
18 /****************************************************************************/
19 #ifndef MSPersonDevice_h
20 #define MSPersonDevice_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>
33 #include "MSDevice.h"
34 
35 
36 // ===========================================================================
37 // class declarations
38 // ===========================================================================
39 class MSTransportable;
40 
41 
42 // ===========================================================================
43 // class definitions
44 // ===========================================================================
53 class MSPersonDevice : public MSDevice {
54 public:
60  MSPersonDevice(MSTransportable& holder, const std::string& id) :
61  MSDevice(id), myHolder(holder) {
62  }
63 
64 
66  virtual ~MSPersonDevice() { }
67 
68 
74  return myHolder;
75  }
76 
77 protected:
80 
81 private:
84 
87 
88 };
89 
90 
91 #endif
92 
93 /****************************************************************************/
Abstract in-person device.
MSTransportable & getHolder() const
Returns the person that holds this device.
virtual ~MSPersonDevice()
Destructor.
MSPersonDevice(MSTransportable &holder, const std::string &id)
Constructor.
MSPersonDevice & operator=(const MSPersonDevice &)
Invalidated assignment operator.
Abstract in-vehicle / in-person device.
Definition: MSDevice.h:63
MSTransportable & myHolder
The person that stores the device.