Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
VTypesHandler.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2014-2023 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/****************************************************************************/
18// An XML-Handler for reading vTypes
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
23#include <string>
24#include <utility>
26
27class EnergyParams;
28
29// ===========================================================================
30// class definitions
31// ===========================================================================
39public:
40 static const int INVALID_VALUE = -999999;
41
42public:
47 VTypesHandler(const std::string& file, std::map<std::string, SUMOVTypeParameter*>& vTypes);
48
49
52
53 void closeVType();
58 void openRoute(const SUMOSAXAttributes& attrs) {
59 UNUSED_PARAMETER(attrs);
60 }
61 void openFlow(const SUMOSAXAttributes& attrs) {
62 UNUSED_PARAMETER(attrs);
63 }
64 void openRouteFlow(const SUMOSAXAttributes& attrs) {
65 UNUSED_PARAMETER(attrs);
66 }
67 void openTrip(const SUMOSAXAttributes& attrs) {
68 UNUSED_PARAMETER(attrs);
69 }
70 void closeRoute(const bool mayBeDisconnected = false) {
71 UNUSED_PARAMETER(mayBeDisconnected);
72 }
74 UNUSED_PARAMETER(attrs);
75 }
77 void closeVehicle() {}
78 void closePerson() {}
82 void closeFlow() {}
83 void closeTrip() {}
85 UNUSED_PARAMETER(attrs);
86 return nullptr;
87 }
88 void addPersonTrip(const SUMOSAXAttributes& attrs) {
89 UNUSED_PARAMETER(attrs);
90 }
91 void addWalk(const SUMOSAXAttributes& attrs) {
92 UNUSED_PARAMETER(attrs);
93 }
94 void addPerson(const SUMOSAXAttributes& attrs) {
95 UNUSED_PARAMETER(attrs);
96 }
97 void addRide(const SUMOSAXAttributes& attrs) {
98 UNUSED_PARAMETER(attrs);
99 }
100 void addContainer(const SUMOSAXAttributes& attrs) {
101 UNUSED_PARAMETER(attrs);
102 }
103 void addTransport(const SUMOSAXAttributes& attrs) {
104 UNUSED_PARAMETER(attrs);
105 }
106 void addTranship(const SUMOSAXAttributes& attrs) {
107 UNUSED_PARAMETER(attrs);
108 }
109
110protected:
111
112
113private:
114 std::map<std::string, SUMOVTypeParameter*>& myVTypes;
115
116
117private:
120
123
124
125};
#define UNUSED_PARAMETER(x)
Definition StdDefs.h:30
An upper class for objects with additional parameters.
Parser for routes during their loading.
Encapsulated SAX-Attributes.
Definition of vehicle stop (position and duration)
An XML-Handler for amitran and netstate trajectories.
void closeContainerFlow()
Ends the processing of a container flow.
void closeVehicle()
Ends the processing of a vehicle.
void closePerson()
Ends the processing of a person.
void closeFlow()
Ends the processing of a flow.
SUMOVehicleParameter::Stop * addStop(const SUMOSAXAttributes &attrs)
Processing of a stop.
VTypesHandler(const VTypesHandler &s)
invalidated copy constructor
static const int INVALID_VALUE
void closeVehicleTypeDistribution()
closes (ends) the building of a distribution
void openTrip(const SUMOSAXAttributes &attrs)
opens a trip for reading
VTypesHandler & operator=(const VTypesHandler &s)
invalidated assignment operator
void openVehicleTypeDistribution(const SUMOSAXAttributes &attrs)
opens a type distribution for reading
void closeTrip()
Ends the processing of a trip.
void addContainer(const SUMOSAXAttributes &attrs)
Processing of a container.
void openRoute(const SUMOSAXAttributes &attrs)
opens a route for reading
~VTypesHandler()
Destructor.
void closePersonFlow()
Ends the processing of a person flow.
void addTranship(const SUMOSAXAttributes &attrs)
Processing of a tranship.
void openFlow(const SUMOSAXAttributes &attrs)
opens a flow for reading
void addPersonTrip(const SUMOSAXAttributes &attrs)
add a routing request for a walking or intermodal person
std::map< std::string, SUMOVTypeParameter * > & myVTypes
void closeVType()
Ends the processing of a vehicle type.
void closeRouteDistribution()
closes (ends) the building of a distribution
void openRouteDistribution(const SUMOSAXAttributes &attrs)
opens a route distribution for reading
void closeContainer()
Ends the processing of a container.
void addPerson(const SUMOSAXAttributes &attrs)
Processing of a person.
void addTransport(const SUMOSAXAttributes &attrs)
Processing of a transport.
void closeRoute(const bool mayBeDisconnected=false)
void addWalk(const SUMOSAXAttributes &attrs)
add a fully specified walk
void openRouteFlow(const SUMOSAXAttributes &attrs)
opens a route flow for reading
void addRide(const SUMOSAXAttributes &attrs)
Processing of a ride.