SUMO - Simulation of Urban MObility
NBPTStopCont.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // Container for pt stops during the netbuilding process
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_NBPTSTOPCONT_H
22 #define SUMO_NBPTSTOPCONT_H
23 
24 #include <string>
25 #include <map>
26 #include "NBPTStop.h"
27 
28 class NBEdgeCont;
29 
30 class NBPTStopCont {
31 
32 public:
37  bool insert(NBPTStop* ptStop);
38 
39 
41  int size() const {
42  return (int) myPTStops.size();
43  }
44 
48  std::map<std::string, NBPTStop*>::const_iterator begin() const {
49  return myPTStops.begin();
50  }
51 
52 
56  std::map<std::string, NBPTStop*>::const_iterator end() const {
57  return myPTStops.end();
58  }
59 
60 
61  void process(NBEdgeCont& cont);
62 private:
64  typedef std::map<std::string, NBPTStop*> PTStopsCont;
65 
67  PTStopsCont myPTStops;
68 
69 };
70 
71 #endif //SUMO_NBPTSTOPCONT_H
PTStopsCont myPTStops
The map of names to pt stops.
Definition: NBPTStopCont.h:67
The representation of a single pt stop.
Definition: NBPTStop.h:49
std::map< std::string, NBPTStop * > PTStopsCont
Definition of the map of names to pt stops.
Definition: NBPTStopCont.h:64
std::map< std::string, NBPTStop * >::const_iterator begin() const
Returns the pointer to the begin of the stored pt stops.
Definition: NBPTStopCont.h:48
Storage for edges, including some functionality operating on multiple edges.
Definition: NBEdgeCont.h:66
std::map< std::string, NBPTStop * >::const_iterator end() const
Returns the pointer to the end of the stored pt stops.
Definition: NBPTStopCont.h:56
void process(NBEdgeCont &cont)
bool insert(NBPTStop *ptStop)
Inserts a node into the map.
int size() const
Returns the number of pt stops stored in this container.
Definition: NBPTStopCont.h:41