SUMO - Simulation of Urban MObility
NBPTLineCont.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 // Container for NBPTLine during netbuild
18 /****************************************************************************/
19 
20 #ifndef SUMO_NBPTLINECONT_H
21 #define SUMO_NBPTLINECONT_H
22 
23 
24 #include <vector>
25 #include "NBPTLine.h"
26 #include "NBEdgeCont.h"
27 
28 class NBPTLineCont {
29 
30 public:
32  NBPTLineCont();
33 
35  ~NBPTLineCont();
36 
38  void insert(NBPTLine* pLine);
39 
43  std::vector<NBPTLine*>::const_iterator begin() const {
44  return myPTLines.begin();
45  }
46 
50  std::vector<NBPTLine*>::const_iterator end() const {
51  return myPTLines.end();
52  }
53 
54  void process(NBEdgeCont& cont);
55 
57  void addEdges2Keep(const OptionsCont& oc, std::set<std::string>& into);
58 
59  std::set<std::string>& getServedPTStops();
60 private:
61 
62  static const int FWD;
63  static const int BWD;
64 
66  typedef std::vector<NBPTLine*> PTLinesCont;
67 
69  PTLinesCont myPTLines;
70 
71  long long int myIdCnt;
72  void reviseStops(NBPTLine* myPTLine, NBEdgeCont& cont);
73  void constructRoute(NBPTLine* myPTLine, NBEdgeCont& cont);
74 
75  std::set<std::string> myServedPTStops;
76 };
77 
78 
79 #endif //SUMO_NBPTLINECONT_H
void reviseStops(NBPTLine *myPTLine, NBEdgeCont &cont)
static const int BWD
Definition: NBPTLineCont.h:63
std::vector< NBPTLine * > PTLinesCont
Definition of the map of names to pt lines.
Definition: NBPTLineCont.h:66
void process(NBEdgeCont &cont)
std::set< std::string > & getServedPTStops()
void insert(NBPTLine *pLine)
insert new line
std::vector< NBPTLine * >::const_iterator end() const
Returns the pointer to the end of the stored pt lines.
Definition: NBPTLineCont.h:50
Storage for edges, including some functionality operating on multiple edges.
Definition: NBEdgeCont.h:66
static const int FWD
Definition: NBPTLineCont.h:62
PTLinesCont myPTLines
The map of names to pt lines.
Definition: NBPTLineCont.h:69
void addEdges2Keep(const OptionsCont &oc, std::set< std::string > &into)
add edges that must be kept
long long int myIdCnt
Definition: NBPTLineCont.h:71
~NBPTLineCont()
destructor
A storage for options typed value containers)
Definition: OptionsCont.h:98
void constructRoute(NBPTLine *myPTLine, NBEdgeCont &cont)
NBPTLineCont()
constructor
std::vector< NBPTLine * >::const_iterator begin() const
Returns the pointer to the begin of the stored pt lines.
Definition: NBPTLineCont.h:43
std::set< std::string > myServedPTStops
Definition: NBPTLineCont.h:75