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 /****************************************************************************/
17 // Class responsible for loading of routes from some files
18 /****************************************************************************/
19 #ifndef SUMORouteLoaderControl_h
20 #define SUMORouteLoaderControl_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
28 #include <vector>
29 
30 
31 // ===========================================================================
32 // class declarations
33 // ===========================================================================
34 class SUMORouteLoader;
35 
36 
37 // ===========================================================================
38 // class definitions
39 // ===========================================================================
50 public:
52  SUMORouteLoaderControl(SUMOTime inAdvanceStepNo);
53 
56 
58  void add(SUMORouteLoader* loader);
59 
61  void loadNext(SUMOTime step);
62 
65  return myFirstLoadTime;
66  }
67 
69  bool haveAllLoaded() const {
70  return myAllLoaded;
71  }
72 
73 private:
76 
79 
82 
84  std::vector<SUMORouteLoader*> myRouteLoaders;
85 
88 
89 private:
92 
95 };
96 
97 
98 #endif
99 
100 /****************************************************************************/
101 
SUMORouteLoader
Definition: SUMORouteLoader.h:42
SUMORouteLoaderControl::getFirstLoadTime
SUMOTime getFirstLoadTime() const
returns the timestamp of the first loaded vehicle or flow
Definition: SUMORouteLoaderControl.h:64
SUMORouteLoaderControl::loadNext
void loadNext(SUMOTime step)
loads the next routes up to and including the given time step
Definition: SUMORouteLoaderControl.cpp:59
SUMORouteLoaderControl::myRouteLoaders
std::vector< SUMORouteLoader * > myRouteLoaders
the list of route loaders
Definition: SUMORouteLoaderControl.h:84
SUMORouteLoaderControl::myInAdvanceStepNo
const SUMOTime myInAdvanceStepNo
the number of routes to read in forward
Definition: SUMORouteLoaderControl.h:81
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:34
SUMORouteLoaderControl::add
void add(SUMORouteLoader *loader)
add another loader
Definition: SUMORouteLoaderControl.cpp:53
SUMORouteLoaderControl::myFirstLoadTime
SUMOTime myFirstLoadTime
the first time step for which vehicles were loaded
Definition: SUMORouteLoaderControl.h:75
SUMORouteLoaderControl::SUMORouteLoaderControl
SUMORouteLoaderControl(SUMOTime inAdvanceStepNo)
constructor
Definition: SUMORouteLoaderControl.cpp:34
SUMORouteLoaderControl::operator=
SUMORouteLoaderControl & operator=(const SUMORouteLoaderControl &src)
Invalidated assignment operator.
SUMORouteLoaderControl::haveAllLoaded
bool haveAllLoaded() const
returns whether loading is completed
Definition: SUMORouteLoaderControl.h:69
SUMORouteLoaderControl::myCurrentLoadTime
SUMOTime myCurrentLoadTime
the time step up to which vehicles were loaded
Definition: SUMORouteLoaderControl.h:78
SUMORouteLoaderControl::~SUMORouteLoaderControl
~SUMORouteLoaderControl()
destructor
Definition: SUMORouteLoaderControl.cpp:44
SUMORouteLoaderControl::myAllLoaded
bool myAllLoaded
Definition: SUMORouteLoaderControl.h:87
SUMORouteLoaderControl::myLoadAll
bool myLoadAll
information whether all routes shall be loaded and whether they were loaded
Definition: SUMORouteLoaderControl.h:87
config.h
SUMORouteLoaderControl
Definition: SUMORouteLoaderControl.h:49