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// ===========================================================================
36// class definitions
37// ===========================================================================
48public:
50 SUMORouteLoaderControl(SUMOTime inAdvanceStepNo);
51
54
56 void add(SUMORouteLoader* loader);
57
59 void loadNext(SUMOTime step);
60
63 return myFirstLoadTime;
64 }
65
67 bool haveAllLoaded() const {
68 return myAllLoaded;
69 }
70
71private:
74
77
80
82 std::vector<SUMORouteLoader*> myRouteLoaders;
83
86
87private:
90
93};
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
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