SUMO - Simulation of Urban MObility
NBPTLineCont.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // Container for NBPTLine during netbuild
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 
21 #ifndef SUMO_NBPTLINECONT_H
22 #define SUMO_NBPTLINECONT_H
23 
24 
25 #include <vector>
26 #include "NBPTLine.h"
27 #include "NBEdgeCont.h"
28 
29 class NBPTLineCont {
30 
31 public:
33  NBPTLineCont();
34 
36  ~NBPTLineCont();
37 
39  void insert(NBPTLine* pLine);
40 
44  std::vector<NBPTLine*>::const_iterator begin() const {
45  return myPTLines.begin();
46  }
47 
51  std::vector<NBPTLine*>::const_iterator end() const {
52  return myPTLines.end();
53  }
54 
55  void process(NBEdgeCont& cont);
56 private:
57 
58  static const int FWD;
59  static const int BWD;
60 
62  typedef std::vector<NBPTLine*> PTLinesCont;
63 
65  PTLinesCont myPTLines;
66 
67  long long int myIdCnt;
68  void reviseStops(NBPTLine* myPTLine, NBEdgeCont& cont);
69  void constructRoute(NBPTLine* myPTLine, NBEdgeCont& cont);
70 };
71 
72 
73 #endif //SUMO_NBPTLINECONT_H
void reviseStops(NBPTLine *myPTLine, NBEdgeCont &cont)
static const int BWD
Definition: NBPTLineCont.h:59
std::vector< NBPTLine * >::const_iterator begin() const
Returns the pointer to the begin of the stored pt lines.
Definition: NBPTLineCont.h:44
std::vector< NBPTLine * > PTLinesCont
Definition of the map of names to pt lines.
Definition: NBPTLineCont.h:62
void process(NBEdgeCont &cont)
void insert(NBPTLine *pLine)
insert new line
Storage for edges, including some functionality operating on multiple edges.
Definition: NBEdgeCont.h:66
static const int FWD
Definition: NBPTLineCont.h:58
PTLinesCont myPTLines
The map of names to pt lines.
Definition: NBPTLineCont.h:65
long long int myIdCnt
Definition: NBPTLineCont.h:67
~NBPTLineCont()
destructor
std::vector< NBPTLine * >::const_iterator end() const
Returns the pointer to the end of the stored pt lines.
Definition: NBPTLineCont.h:51
void constructRoute(NBPTLine *myPTLine, NBEdgeCont &cont)
NBPTLineCont()
constructor