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-2018 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
18 // Class responsible for loading of routes from some files
19 /****************************************************************************/
20 #ifndef SUMORouteLoaderControl_h
21 #define SUMORouteLoaderControl_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #include <config.h>
28 
29 #include <vector>
30 
31 
32 // ===========================================================================
33 // class declarations
34 // ===========================================================================
35 class SUMORouteLoader;
36 
37 
38 // ===========================================================================
39 // class definitions
40 // ===========================================================================
51 public:
53  SUMORouteLoaderControl(SUMOTime inAdvanceStepNo);
54 
57 
59  void add(SUMORouteLoader* loader);
60 
62  void loadNext(SUMOTime step);
63 
66  return myFirstLoadTime;
67  }
68 
70  bool haveAllLoaded() const {
71  return myAllLoaded;
72  }
73 
74 private:
77 
80 
83 
85  std::vector<SUMORouteLoader*> myRouteLoaders;
86 
90 
91 private:
94 
97 };
98 
99 
100 #endif
101 
102 /****************************************************************************/
103 
long long int SUMOTime
Definition: SUMOTime.h:36
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