Eclipse SUMO - Simulation of Urban MObility
NBVehicle.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2002-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 /****************************************************************************/
16 // A vehicle as used by router
17 /****************************************************************************/
18 #ifndef NBVehicle_h
19 #define NBVehicle_h
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #include <string>
28 #include <iostream>
29 
30 
31 // ===========================================================================
32 // class declarations
33 // ===========================================================================
34 
35 
36 // ===========================================================================
37 // class definitions
38 // ===========================================================================
43 class NBVehicle {
44 public:
51  NBVehicle(const std::string& id, SUMOVehicleClass vClass):
52  myID(id), myVClass(vClass) {}
53 
54  const std::string& getID() const {
55  return myID;
56  }
57 
59  return myVClass;
60  }
61 
62 
64  virtual ~NBVehicle() {}
65 
66 
67 private:
69  std::string myID;
70 
73 
74 
75 private:
77  NBVehicle(const NBVehicle& src);
78 
80  NBVehicle& operator=(const NBVehicle& src);
81 
82 };
83 
84 
85 #endif
86 
87 /****************************************************************************/
SUMOVehicleClass
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
Definition: SUMOVehicleClass.h:133
NBVehicle::operator=
NBVehicle & operator=(const NBVehicle &src)
Invalidated assignment operator.
NBVehicle::getVClass
SUMOVehicleClass getVClass() const
Definition: NBVehicle.h:58
NBVehicle::myID
std::string myID
vehicle ID for error reporting
Definition: NBVehicle.h:69
NBVehicle::getID
const std::string & getID() const
Definition: NBVehicle.h:54
NBVehicle::myVClass
SUMOVehicleClass myVClass
The vehicle class of the.
Definition: NBVehicle.h:72
NBVehicle
A vehicle as used by router.
Definition: NBVehicle.h:43
NBVehicle::NBVehicle
NBVehicle(const std::string &id, SUMOVehicleClass vClass)
Constructor.
Definition: NBVehicle.h:51
NBVehicle::~NBVehicle
virtual ~NBVehicle()
Destructor.
Definition: NBVehicle.h:64
config.h