Eclipse 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-2019 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 
89 
90 private:
93 
96 };
97 
98 
99 #endif
100 
101 /****************************************************************************/
102 
SUMORouteLoader
Definition: SUMORouteLoader.h:43
SUMORouteLoaderControl::getFirstLoadTime
SUMOTime getFirstLoadTime() const
returns the timestamp of the first loaded vehicle or flow
Definition: SUMORouteLoaderControl.h:65
SUMORouteLoaderControl::loadNext
void loadNext(SUMOTime step)
loads the next routes up to and including the given time step
Definition: SUMORouteLoaderControl.cpp:60
SUMORouteLoaderControl::myRouteLoaders
std::vector< SUMORouteLoader * > myRouteLoaders
the list of route loaders
Definition: SUMORouteLoaderControl.h:85
SUMORouteLoaderControl::myInAdvanceStepNo
const SUMOTime myInAdvanceStepNo
the number of routes to read in forward
Definition: SUMORouteLoaderControl.h:82
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:35
SUMORouteLoaderControl::add
void add(SUMORouteLoader *loader)
add another loader
Definition: SUMORouteLoaderControl.cpp:54
SUMORouteLoaderControl::myFirstLoadTime
SUMOTime myFirstLoadTime
the first time step for which vehicles were loaded
Definition: SUMORouteLoaderControl.h:76
SUMORouteLoaderControl::SUMORouteLoaderControl
SUMORouteLoaderControl(SUMOTime inAdvanceStepNo)
constructor
Definition: SUMORouteLoaderControl.cpp:35
SUMORouteLoaderControl::operator=
SUMORouteLoaderControl & operator=(const SUMORouteLoaderControl &src)
Invalidated assignment operator.
SUMORouteLoaderControl::haveAllLoaded
bool haveAllLoaded() const
returns whether loading is completed
Definition: SUMORouteLoaderControl.h:70
SUMORouteLoaderControl::myCurrentLoadTime
SUMOTime myCurrentLoadTime
the time step up to which vehicles were loaded
Definition: SUMORouteLoaderControl.h:79
SUMORouteLoaderControl::~SUMORouteLoaderControl
~SUMORouteLoaderControl()
destructor
Definition: SUMORouteLoaderControl.cpp:45
SUMORouteLoaderControl::myAllLoaded
bool myAllLoaded
Definition: SUMORouteLoaderControl.h:88
SUMORouteLoaderControl::myLoadAll
bool myLoadAll
information whether all routes shall be loaded and whether they were loaded
Definition: SUMORouteLoaderControl.h:88
config.h
SUMORouteLoaderControl
Definition: SUMORouteLoaderControl.h:50