SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RORouteDef.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // Base class for a vehicle's route definition
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 RORouteDef_h
22 #define RORouteDef_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/Named.h>
37 #include "ReferencedItem.h"
39 #include <utils/common/RGBColor.h>
40 
41 
42 // ===========================================================================
43 // class declarations
44 // ===========================================================================
45 class ROEdge;
46 class RORoute;
47 class OptionsCont;
48 class ROVehicle;
49 class OutputDevice;
50 
51 
52 // ===========================================================================
53 // class definitions
54 // ===========================================================================
64 class RORouteDef : public ReferencedItem, public Named {
65 public:
71  RORouteDef(const std::string& id, const RGBColor* const color) ;
72 
73 
75  virtual ~RORouteDef() ;
76 
77 
81  const ROVehicle& veh) const;
82 
86  const ROVehicle& veh) const = 0;
87 
92  const ROVehicle* const, RORoute* current, SUMOTime begin) = 0;
93 
95  virtual RORouteDef* copy(const std::string& id) const = 0;
96 
98  const RGBColor* getColor() const {
99  return myColor;
100  }
101 
102  virtual const ROEdge* getDestination() const = 0;
103 
113  OutputDevice& dev, const ROVehicle* const veh,
114  bool asAlternatives, bool withExitTimes) const = 0;
115 
116 protected:
117  const RGBColor* copyColorIfGiven() const ;
118 
119 protected:
121  const RGBColor* const myColor;
122 
125 
126 private:
128  RORouteDef(const RORouteDef& src);
129 
131  RORouteDef& operator=(const RORouteDef& src);
132 
133 };
134 
135 
136 #endif
137 
138 /****************************************************************************/
139