SUMO - Simulation of Urban MObility
NBPTStop.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // The representation of a single pt stop
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
10 // Copyright (C) 2001-2017 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software: you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation, either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 #ifndef SUMO_NBPTSTOP_H
21 #define SUMO_NBPTSTOP_H
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #ifdef _MSC_VER
27 #include <windows_config.h>
28 #else
29 #include <config.h>
30 #endif
31 
32 #include <string>
33 #include <utils/geom/Position.h>
35 #include "NBPTPlatform.h"
36 
37 
38 // ===========================================================================
39 // class declarations
40 // ===========================================================================
41 class OutputDevice;
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 setLaneID(const std::string& laneId);
70  void write(OutputDevice& device);
71  void reshiftPostion(const double offsetX, const double offsetY);
72 
73  std::vector<NBPTPlatform>& getPlatformCands();
75  void setIsMultipleStopPositions(bool multipleStopPositions);
76  double getLength();
77  void setEdgeId(std::string edgeId);
78  void registerAdditionalEdge(std::string wayId, std::string edgeId);
79  void addPlatformCand(NBPTPlatform platform);
80 private:
81  const std::string myPTStopId;
83  std::string myEdgeId;
84  std::map<std::string, std::string> myAdditionalEdgeCandidates;
85 public:
86  const std::map<std::string, std::string>& getMyAdditionalEdgeCandidates() const;
87 private:
88  std::string myOrigEdgeId;
89 public:
90  void setMyOrigEdgeId(const std::string& myOrigEdgeId);
91 private:
93 public:
94  void setMyPTStopLength(double myPTStopLength);
95 private:
96  const std::string myName;
97  std::string myLaneId;
99 
100  double myStartPos;
101  double myEndPos;
102 
103 
104 private:
106  NBPTStop& operator=(const NBPTStop&);
107 
108 
109  std::vector<NBPTPlatform> myPlatformCands;
111 };
112 
113 #endif //SUMO_NBPTSTOP_H
const std::string getName()
Definition: NBPTStop.cpp:66
void write(OutputDevice &device)
Definition: NBPTStop.cpp:81
bool myIsMultipleStopPositions
Definition: NBPTStop.h:110
const std::string getEdgeId()
Definition: NBPTStop.cpp:61
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:109
The representation of a single pt stop.
Definition: NBPTStop.h:51
void registerAdditionalEdge(std::string wayId, std::string edgeId)
Definition: NBPTStop.cpp:125
const std::string myName
Definition: NBPTStop.h:96
NBPTStop(std::string ptStopId, Position position, std::string edgeId, std::string origEdgeId, double length, std::string name, SVCPermissions svcPermissions)
Constructor.
Definition: NBPTStop.cpp:38
SVCPermissions getPermissions()
Definition: NBPTStop.cpp:103
std::string myEdgeId
Definition: NBPTStop.h:83
std::string getID() const
Definition: NBPTStop.cpp:51
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
void computExtent(double center, double d)
Definition: NBPTStop.cpp:73
double myStartPos
Definition: NBPTStop.h:100
const std::map< std::string, std::string > & getMyAdditionalEdgeCandidates() const
Definition: NBPTStop.cpp:128
void setIsMultipleStopPositions(bool multipleStopPositions)
Definition: NBPTStop.cpp:116
double myPTStopLength
Definition: NBPTStop.h:92
void reshiftPostion(const double offsetX, const double offsetY)
Definition: NBPTStop.cpp:94
bool getIsMultipleStopPositions()
Definition: NBPTStop.cpp:112
void setLaneID(const std::string &laneId)
Definition: NBPTStop.cpp:78
double myEndPos
Definition: NBPTStop.h:101
Position myPosition
Definition: NBPTStop.h:82
std::vector< NBPTPlatform > & getPlatformCands()
Definition: NBPTStop.cpp:109
std::map< std::string, std::string > myAdditionalEdgeCandidates
Definition: NBPTStop.h:84
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
const Position & getPosition()
Definition: NBPTStop.cpp:69
void setEdgeId(std::string edgeId)
Definition: NBPTStop.cpp:122
std::string myLaneId
Definition: NBPTStop.h:97
std::string myOrigEdgeId
Definition: NBPTStop.h:88
void setMyOrigEdgeId(const std::string &myOrigEdgeId)
Definition: NBPTStop.cpp:131
double getLength()
Definition: NBPTStop.cpp:119
void addPlatformCand(NBPTPlatform platform)
Definition: NBPTStop.cpp:106
void setMyPTStopLength(double myPTStopLength)
Definition: NBPTStop.cpp:134
const std::string getOrigEdgeId()
Definition: NBPTStop.cpp:56
const std::string myPTStopId
Definition: NBPTStop.h:81
const SVCPermissions myPermissions
Definition: NBPTStop.h:98