Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
SUMORouteLoaderControl.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2002-2024 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
21// Class responsible for loading of routes from some files
22/****************************************************************************/
23#pragma once
24#include <config.h>
25
26#include <vector>
27
28
29// ===========================================================================
30// class declarations
31// ===========================================================================
32class SUMORouteLoader;
33
34// ===========================================================================
35// class definitions
36// ===========================================================================
47public:
49 SUMORouteLoaderControl(SUMOTime inAdvanceStepNo);
50
53
55 void add(SUMORouteLoader* loader);
56
58 void loadNext(SUMOTime step);
59
62 return myFirstLoadTime;
63 }
64
66 bool haveAllLoaded() const {
67 return myAllLoaded;
68 }
69
72
73private:
76
79
82
84 std::vector<SUMORouteLoader*> myRouteLoaders;
85
88
89private:
92
95};
long long int SUMOTime
Definition GUI.h:36
SUMOTime myCurrentLoadTime
the time step up to which vehicles were loaded
bool myLoadAll
information whether all routes shall be loaded and whether they were loaded
SUMORouteLoaderControl & operator=(const SUMORouteLoaderControl &src)
Invalidated assignment operator.
SUMOTime getFirstLoadTime() const
returns the timestamp of the first loaded vehicle or flow
std::vector< SUMORouteLoader * > myRouteLoaders
the list of route loaders
const SUMOTime myInAdvanceStepNo
the number of routes to read in forward
SUMORouteLoader * getFirstLoader() const
return a route loader
bool haveAllLoaded() const
returns whether loading is completed
SUMOTime myFirstLoadTime
the first time step for which vehicles were loaded
SUMORouteLoaderControl(const SUMORouteLoaderControl &src)
Invalidated copy constructor.
void loadNext(SUMOTime step)
loads the next routes up to and including the given time step
void add(SUMORouteLoader *loader)
add another loader