SUMO - Simulation of Urban MObility
NBPTStop.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
17 // The representation of a single pt stop
18 /****************************************************************************/
19 #ifndef SUMO_NBPTSTOP_H
20 #define SUMO_NBPTSTOP_H
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #ifdef _MSC_VER
26 #include <windows_config.h>
27 #else
28 #include <config.h>
29 #endif
30 
31 #include <string>
32 #include <utils/geom/Position.h>
34 #include "NBPTPlatform.h"
35 
36 
37 // ===========================================================================
38 // class declarations
39 // ===========================================================================
40 class OutputDevice;
41 class NBEdgeCont;
42 
43 
44 // ===========================================================================
45 // class definitions
46 // ===========================================================================
51 class NBPTStop {
52 
53 public:
60  NBPTStop(std::string ptStopId, Position position, std::string edgeId, std::string origEdgeId, double length, std::string name, SVCPermissions svcPermissions);
61  std::string getID() const;
62 
63  const std::string getEdgeId();
64  const std::string getOrigEdgeId();
65  const std::string getName();
66  const Position& getPosition();
68  void computExtent(double center, double d);
69  void write(OutputDevice& device);
70  void reshiftPostion(const double offsetX, const double offsetY);
71 
72  std::vector<NBPTPlatform>& getPlatformCands();
74  void setIsMultipleStopPositions(bool multipleStopPositions);
75  double getLength();
76  bool setEdgeId(std::string edgeId, NBEdgeCont& ec);
77  void registerAdditionalEdge(std::string wayId, std::string edgeId);
78  void addPlatformCand(NBPTPlatform platform);
80 
81  void setMyPTStopId(std::string id);
82  void addAccess(std::string laneID, double offset);
83 private:
84  std::string myPTStopId;
86  std::string myEdgeId;
87  std::map<std::string, std::string> myAdditionalEdgeCandidates;
88 public:
89  const std::map<std::string, std::string>& getMyAdditionalEdgeCandidates() const;
90 private:
91  std::string myOrigEdgeId;
92 public:
93  void setMyOrigEdgeId(const std::string& myOrigEdgeId);
94 private:
96 public:
97  void setMyPTStopLength(double myPTStopLength);
98 private:
99  const std::string myName;
100  std::string myLaneId;
102 
103  double myStartPos;
104  double myEndPos;
105 
106  std::vector<std::tuple<std::string, double>> myAccesses;
107 
108 
109 private:
111  NBPTStop& operator=(const NBPTStop&);
112 
113 
114  std::vector<NBPTPlatform> myPlatformCands;
116 };
117 
118 #endif //SUMO_NBPTSTOP_H
bool setEdgeId(std::string edgeId, NBEdgeCont &ec)
Definition: NBPTStop.cpp:134
const std::string getName()
Definition: NBPTStop.cpp:69
void write(OutputDevice &device)
Definition: NBPTStop.cpp:81
bool myIsMultipleStopPositions
Definition: NBPTStop.h:115
std::vector< std::tuple< std::string, double > > myAccesses
Definition: NBPTStop.h:106
const std::string getEdgeId()
Definition: NBPTStop.cpp:64
NBPTStop & operator=(const NBPTStop &)
Invalidated assignment operator.
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
std::vector< NBPTPlatform > myPlatformCands
Definition: NBPTStop.h:114
std::string getID() const
Definition: NBPTStop.cpp:54
void setMyPTStopId(std::string id)
Definition: NBPTStop.cpp:176
The representation of a single pt stop.
Definition: NBPTStop.h:51
void registerAdditionalEdge(std::string wayId, std::string edgeId)
Definition: NBPTStop.cpp:139
const std::string myName
Definition: NBPTStop.h:99
const std::map< std::string, std::string > & getMyAdditionalEdgeCandidates() const
Definition: NBPTStop.cpp:142
NBPTStop(std::string ptStopId, Position position, std::string edgeId, std::string origEdgeId, double length, std::string name, SVCPermissions svcPermissions)
Constructor.
Definition: NBPTStop.cpp:40
SVCPermissions getPermissions()
Definition: NBPTStop.cpp:113
std::string myEdgeId
Definition: NBPTStop.h:86
void addAccess(std::string laneID, double offset)
Definition: NBPTStop.cpp:179
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:45
void computExtent(double center, double d)
Definition: NBPTStop.cpp:76
std::string myPTStopId
Definition: NBPTStop.h:84
Storage for edges, including some functionality operating on multiple edges.
Definition: NBEdgeCont.h:66
double myStartPos
Definition: NBPTStop.h:103
void setIsMultipleStopPositions(bool multipleStopPositions)
Definition: NBPTStop.cpp:126
double myPTStopLength
Definition: NBPTStop.h:95
void reshiftPostion(const double offsetX, const double offsetY)
Definition: NBPTStop.cpp:104
bool getIsMultipleStopPositions()
Definition: NBPTStop.cpp:122
bool findLaneAndComputeBusStopExtend(NBEdgeCont &ec)
Definition: NBPTStop.cpp:155
double myEndPos
Definition: NBPTStop.h:104
Position myPosition
Definition: NBPTStop.h:85
std::vector< NBPTPlatform > & getPlatformCands()
Definition: NBPTStop.cpp:119
std::map< std::string, std::string > myAdditionalEdgeCandidates
Definition: NBPTStop.h:87
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:70
const Position & getPosition()
Definition: NBPTStop.cpp:72
std::string myLaneId
Definition: NBPTStop.h:100
std::string myOrigEdgeId
Definition: NBPTStop.h:91
void setMyOrigEdgeId(const std::string &myOrigEdgeId)
Definition: NBPTStop.cpp:145
double getLength()
Definition: NBPTStop.cpp:129
void addPlatformCand(NBPTPlatform platform)
Definition: NBPTStop.cpp:116
void setMyPTStopLength(double myPTStopLength)
Definition: NBPTStop.cpp:149
const std::string getOrigEdgeId()
Definition: NBPTStop.cpp:59
const SVCPermissions myPermissions
Definition: NBPTStop.h:101