SUMO - Simulation of Urban MObility
NBPTLine.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // The representation of one direction of a single pt line
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
11 // Copyright (C) 2001-2017 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 SUMO_NBPTLINE_H
22 #define SUMO_NBPTLINE_H
23 
24 
25 #include <string>
26 #include <vector>
27 #include <map>
28 #include "NBEdge.h" // Cherednychek
29 
30 // ===========================================================================
31 // class declarations
32 // ===========================================================================
33 class OutputDevice;
34 class NBPTStop;
35 
36 class NBPTLine {
37 
38 public:
39  explicit NBPTLine(std::string name);
40 
41  void addPTStop(NBPTStop* pStop);
42  std::string getName();
43  std::vector<NBPTStop*> getStops();
44  void write(OutputDevice& device);
45  void setId(long long int id);
46  void addWayNode(long long int way, long long int node);
47  void setRef(std::string basic_string);
48 
49  void setMyNumOfStops(unsigned long numStops);
50 private:
51  std::string myName;
52  std::vector<NBPTStop*> myPTStops;
53 
54 private:
55  std::map<std::string, std::vector<long long int> > myWaysNodes;
56  std::vector<std::string> myWays;
57 public:
58  const std::vector<std::string>& getMyWays() const;
59  std::vector<long long int>* getWaysNodes(std::string wayId);
60 private:
61 
62  std::string myCurrentWay;
63  long long int myPTLineId;
64  std::string myRef;
65 
66 public:
67  void addEdgeVector(std::vector<NBEdge*>::iterator fr, std::vector<NBEdge*>::iterator to);
68  std::string getRoute();
69 private:
70  // route of ptline
71  std::vector<NBEdge*> myRoute;
72 
73  unsigned long myNumOfStops;
74 };
75 
76 
77 #endif //SUMO_NBPTLINE_H
std::vector< long long int > * getWaysNodes(std::string wayId)
Definition: NBPTLine.cpp:84
std::string myRef
Definition: NBPTLine.h:64
std::string getName()
Definition: NBPTLine.cpp:35
std::vector< std::string > myWays
Definition: NBPTLine.h:56
std::vector< NBPTStop * > myPTStops
Definition: NBPTLine.h:52
void addPTStop(NBPTStop *pStop)
Definition: NBPTLine.cpp:31
void setMyNumOfStops(unsigned long numStops)
Definition: NBPTLine.cpp:106
The representation of a single pt stop.
Definition: NBPTStop.h:51
std::string getRoute()
Definition: NBPTLine.cpp:94
unsigned long myNumOfStops
Definition: NBPTLine.h:73
void addWayNode(long long int way, long long int node)
Definition: NBPTLine.cpp:72
void setRef(std::string basic_string)
Definition: NBPTLine.cpp:90
long long int myPTLineId
Definition: NBPTLine.h:63
std::string myName
Definition: NBPTLine.h:51
std::string myCurrentWay
Definition: NBPTLine.h:62
const std::vector< std::string > & getMyWays() const
Definition: NBPTLine.cpp:81
NBPTLine(std::string name)
Definition: NBPTLine.cpp:27
std::vector< NBEdge * > myRoute
Definition: NBPTLine.h:71
std::map< std::string, std::vector< long long int > > myWaysNodes
Definition: NBPTLine.h:55
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
std::vector< NBPTStop * > getStops()
Definition: NBPTLine.cpp:38
void write(OutputDevice &device)
Definition: NBPTLine.cpp:41
void setId(long long int id)
Definition: NBPTLine.cpp:69
void addEdgeVector(std::vector< NBEdge * >::iterator fr, std::vector< NBEdge * >::iterator to)
Definition: NBPTLine.cpp:102