SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MSJunction.h
Go to the documentation of this file.
1 /****************************************************************************/
10 // The base class for an intersection
11 /****************************************************************************/
12 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
13 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
14 /****************************************************************************/
15 //
16 // This file is part of SUMO.
17 // SUMO is free software: you can redistribute it and/or modify
18 // it under the terms of the GNU General Public License as published by
19 // the Free Software Foundation, either version 3 of the License, or
20 // (at your option) any later version.
21 //
22 /****************************************************************************/
23 #ifndef MSJunction_h
24 #define MSJunction_h
25 
26 
27 // ===========================================================================
28 // included modules
29 // ===========================================================================
30 #ifdef _MSC_VER
31 #include <windows_config.h>
32 #else
33 #include <config.h>
34 #endif
35 
36 #include <string>
37 #include <vector>
38 #include <map>
39 #include <utils/geom/Position.h>
41 #include <utils/common/SUMOTime.h>
43 
44 
45 class MSVehicle;
46 class MSLink;
47 class MSLane;
48 
49 // ===========================================================================
50 // class definitions
51 // ===========================================================================
56 class MSJunction {
57 public:
59  virtual ~MSJunction();
60 
66  MSJunction(const std::string& id, const Position& position,
67  const PositionVector& shape) ;
68 
71  virtual void postloadInit() ;
72 
73 
75  const Position& getPosition() const;
76 
78  const std::string& getID() const;
79 
83  const PositionVector& getShape() const {
84  return myShape;
85  }
86 
87  virtual const std::vector<MSLink*> &getFoeLinks(const MSLink* const /*srcLink*/) const {
88  return myEmptyLinks;
89  }
90 
91  virtual const std::vector<MSLane*> &getFoeInternalLanes(const MSLink* const /*srcLink*/) const {
92  return myEmptyLanes;
93  }
94 
95 protected:
97  std::string myID;
98 
101 
104 
105  std::vector<MSLink*> myEmptyLinks;
106  std::vector<MSLane*> myEmptyLanes;
107 
108 
109 
110 
111 private:
113  MSJunction(const MSJunction&);
114 
117 
118 };
119 
120 
121 #endif
122 
123 /****************************************************************************/
124