SUMO - Simulation of Urban MObility
SUMORouteLoaderControl.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2002-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 /****************************************************************************/
20 // Class responsible for loading of routes from some files
21 /****************************************************************************/
22 #ifndef SUMORouteLoaderControl_h
23 #define SUMORouteLoaderControl_h
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
35 #include <vector>
36 
37 
38 // ===========================================================================
39 // class declarations
40 // ===========================================================================
41 class SUMORouteLoader;
42 
43 
44 // ===========================================================================
45 // class definitions
46 // ===========================================================================
57 public:
59  SUMORouteLoaderControl(SUMOTime inAdvanceStepNo);
60 
63 
65  void add(SUMORouteLoader* loader);
66 
68  void loadNext(SUMOTime step);
69 
72  return myFirstLoadTime;
73  }
74 
76  bool haveAllLoaded() const {
77  return myAllLoaded;
78  }
79 
80 private:
83 
86 
89 
91  std::vector<SUMORouteLoader*> myRouteLoaders;
92 
96 
97 private:
100 
103 };
104 
105 
106 #endif
107 
108 /****************************************************************************/
109 
SUMOTime getFirstLoadTime() const
returns the timestamp of the first loaded vehicle or flow
void loadNext(SUMOTime step)
loads the next routes up to and including the given time step
std::vector< SUMORouteLoader * > myRouteLoaders
the list of route loaders
void add(SUMORouteLoader *loader)
add another loader
const SUMOTime myInAdvanceStepNo
the number of routes to read in forward
SUMOTime myFirstLoadTime
the first time step for which vehicles were loaded
SUMORouteLoaderControl(SUMOTime inAdvanceStepNo)
constructor
SUMORouteLoaderControl & operator=(const SUMORouteLoaderControl &src)
Invalidated assignment operator.
bool haveAllLoaded() const
returns whether loading is completed
SUMOTime myCurrentLoadTime
the time step up to which vehicles were loaded
long long int SUMOTime
Definition: TraCIDefs.h:51