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-sim.org/
13 // Copyright (C) 2001-2014 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/Named.h>
42 #include <utils/common/SUMOTime.h>
44 
45 
46 class MSVehicle;
47 class MSLink;
48 class MSLane;
49 
50 // ===========================================================================
51 // class definitions
52 // ===========================================================================
57 class MSJunction : public Named {
58 public:
64  MSJunction(const std::string& id, const Position& position,
65  const PositionVector& shape);
66 
67 
69  virtual ~MSJunction();
70 
71 
74  virtual void postloadInit();
75 
76 
78  const Position& getPosition() const;
79 
80 
84  const PositionVector& getShape() const {
85  return myShape;
86  }
87 
88  virtual const std::vector<MSLink*>& getFoeLinks(const MSLink* const /*srcLink*/) const {
89  return myEmptyLinks;
90  }
91 
92  virtual const std::vector<MSLane*>& getFoeInternalLanes(const MSLink* const /*srcLink*/) const {
93  return myEmptyLanes;
94  }
95 
96 protected:
99 
102 
103  std::vector<MSLink*> myEmptyLinks;
104  std::vector<MSLane*> myEmptyLanes;
105 
106 
107 
108 
109 private:
111  MSJunction(const MSJunction&);
112 
115 
116 };
117 
118 
119 #endif
120 
121 /****************************************************************************/
122 
MSJunction & operator=(const MSJunction &)
Invalidated assignment operator.
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:77
virtual const std::vector< MSLink * > & getFoeLinks(const MSLink *const ) const
Definition: MSJunction.h:88
The base class for an intersection.
Definition: MSJunction.h:57
const PositionVector & getShape() const
Returns this junction's shape.
Definition: MSJunction.h:84
std::vector< MSLink * > myEmptyLinks
Definition: MSJunction.h:103
virtual ~MSJunction()
Destructor.
Definition: MSJunction.cpp:54
Position myPosition
The position of the junction.
Definition: MSJunction.h:98
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
A list of positions.
MSJunction(const std::string &id, const Position &position, const PositionVector &shape)
Constructor.
Definition: MSJunction.cpp:49
Base class for objects which have an id.
Definition: Named.h:45
virtual void postloadInit()
Definition: MSJunction.cpp:64
virtual const std::vector< MSLane * > & getFoeInternalLanes(const MSLink *const ) const
Definition: MSJunction.h:92
PositionVector myShape
The shape of the junction.
Definition: MSJunction.h:101
std::vector< MSLane * > myEmptyLanes
Definition: MSJunction.h:104
Representation of a lane in the micro simulation.
Definition: MSLane.h:77
const Position & getPosition() const
Definition: MSJunction.cpp:58