SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ROVehicle.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // A vehicle as used by router
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
11 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
12 /****************************************************************************/
13 //
14 // This file is part of SUMO.
15 // SUMO is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 /****************************************************************************/
21 #ifndef ROVehicle_h
22 #define ROVehicle_h
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include <string>
35 #include <iostream>
36 #include <utils/common/SUMOTime.h>
37 #include <utils/common/RGBColor.h>
42 
43 
44 // ===========================================================================
45 // class declarations
46 // ===========================================================================
47 class SUMOVTypeParameter;
48 class RORouteDef;
49 class OutputDevice;
50 class ROEdge;
51 
52 
53 // ===========================================================================
54 // class definitions
55 // ===========================================================================
60 class ROVehicle {
61 public:
70  ROVehicle(const SUMOVehicleParameter& pars,
71  RORouteDef* route, SUMOVTypeParameter* type) ;
72 
73 
75  virtual ~ROVehicle() ;
76 
77 
85  return myRoute;
86  }
87 
88 
95  const SUMOVTypeParameter* getType() const {
96  return myType;
97  }
98 
99 
104  const std::string& getID() const {
105  return myParameter.id;
106  }
107 
108 
114  return myParameter.depart;
115  }
116 
117 
119  SUMOReal getMaxSpeed() const;
120 
121 
122  inline SUMOVehicleClass getVClass() const {
123  return getType() != 0 ? getType()->vehicleClass : DEFAULT_VEH_CLASS;
124  }
125 
126 
141  OutputDevice& os, OutputDevice* const altos,
142  OutputDevice* const typeos, bool withExitTimes) const;
143 
144 
154  virtual ROVehicle* copy(const std::string& id, unsigned int depTime, RORouteDef* newRoute) ;
155 
156 
157 protected:
160 
163 
166 
167 
168 private:
170  ROVehicle(const ROVehicle& src);
171 
173  ROVehicle& operator=(const ROVehicle& src);
174 
175 };
176 
177 
178 #endif
179 
180 /****************************************************************************/
181