SUMO - Simulation of Urban MObility
SUMORouteLoaderControl.h
Go to the documentation of this file.
1 /****************************************************************************/
10 // Class responsible for loading of routes from some files
11 /****************************************************************************/
12 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
13 // Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors
14 /****************************************************************************/
15 //
16 // This file is part of SUMO.
17 // SUMO is free software: you can redistribute it and/or modify
18 // it under the terms of the GNU General Public License as published by
19 // the Free Software Foundation, either version 3 of the License, or
20 // (at your option) any later version.
21 //
22 /****************************************************************************/
23 #ifndef SUMORouteLoaderControl_h
24 #define SUMORouteLoaderControl_h
25 
26 
27 // ===========================================================================
28 // included modules
29 // ===========================================================================
30 #ifdef _MSC_VER
31 #include <windows_config.h>
32 #else
33 #include <config.h>
34 #endif
35 
36 #include <vector>
37 
38 
39 // ===========================================================================
40 // class declarations
41 // ===========================================================================
42 class SUMORouteLoader;
43 
44 
45 // ===========================================================================
46 // class definitions
47 // ===========================================================================
58 public:
60  SUMORouteLoaderControl(SUMOTime inAdvanceStepNo);
61 
64 
66  void add(SUMORouteLoader* loader);
67 
69  void loadNext(SUMOTime step);
70 
73  return myFirstLoadTime;
74  }
75 
77  bool haveAllLoaded() const {
78  return myAllLoaded;
79  }
80 
81 private:
84 
87 
90 
92  std::vector<SUMORouteLoader*> myRouteLoaders;
93 
97 };
98 
99 
100 #endif
101 
102 /****************************************************************************/
103 
long long int SUMOTime
Definition: SUMOTime.h:43
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
SUMOTime myInAdvanceStepNo
the number of routes to read in forward
SUMOTime getFirstLoadTime() const
returns the timestamp of the first loaded vehicle or flow
void add(SUMORouteLoader *loader)
add another loader
SUMOTime myFirstLoadTime
the first time step for which vehicles were loaded
SUMORouteLoaderControl(SUMOTime inAdvanceStepNo)
constructor
SUMOTime myCurrentLoadTime
the time step up to which vehicles were loaded
bool haveAllLoaded() const
returns whether loading is completed