Eclipse SUMO - Simulation of Urban MObility
VTypesHandler.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3// Copyright (C) 2014-2022 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();
55 UNUSED_PARAMETER(attrs);
56 }
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() {}
84 void addStop(const SUMOSAXAttributes& attrs) {
85 UNUSED_PARAMETER(attrs);
86 }
87 void addPersonTrip(const SUMOSAXAttributes& attrs) {
88 UNUSED_PARAMETER(attrs);
89 }
90 void addWalk(const SUMOSAXAttributes& attrs) {
91 UNUSED_PARAMETER(attrs);
92 }
93 void addPerson(const SUMOSAXAttributes& attrs) {
94 UNUSED_PARAMETER(attrs);
95 }
96 void addRide(const SUMOSAXAttributes& attrs) {
97 UNUSED_PARAMETER(attrs);
98 }
99 void addContainer(const SUMOSAXAttributes& attrs) {
100 UNUSED_PARAMETER(attrs);
101 }
102 void addTransport(const SUMOSAXAttributes& attrs) {
103 UNUSED_PARAMETER(attrs);
104 }
105 void addTranship(const SUMOSAXAttributes& attrs) {
106 UNUSED_PARAMETER(attrs);
107 }
108
109protected:
110
111
112private:
113 std::map<std::string, SUMOVTypeParameter*>& myVTypes;
114
115
116private:
119
122
123
124};
#define UNUSED_PARAMETER(x)
Definition: StdDefs.h:30
An upper class for objects with additional parameters.
Definition: EnergyParams.h:41
Parser for routes during their loading.
Encapsulated SAX-Attributes.
An XML-Handler for amitran and netstate trajectories.
Definition: VTypesHandler.h:38
void closeContainerFlow()
Ends the processing of a container flow.
Definition: VTypesHandler.h:81
void closeVehicle()
Ends the processing of a vehicle.
Definition: VTypesHandler.h:77
void closePerson()
Ends the processing of a person.
Definition: VTypesHandler.h:78
void closeFlow()
Ends the processing of a flow.
Definition: VTypesHandler.h:82
VTypesHandler(const VTypesHandler &s)
invalidated copy constructor
static const int INVALID_VALUE
Definition: VTypesHandler.h:40
void closeVehicleTypeDistribution()
closes (ends) the building of a distribution
Definition: VTypesHandler.h:57
VTypesHandler(const std::string &file, std::map< std::string, SUMOVTypeParameter * > &vTypes)
Constructor.
void openTrip(const SUMOSAXAttributes &attrs)
opens a trip for reading
Definition: VTypesHandler.h:67
VTypesHandler & operator=(const VTypesHandler &s)
invalidated assignment operator
void openVehicleTypeDistribution(const SUMOSAXAttributes &attrs)
opens a type distribution for reading
Definition: VTypesHandler.h:54
void closeTrip()
Ends the processing of a trip.
Definition: VTypesHandler.h:83
void addContainer(const SUMOSAXAttributes &attrs)
Processing of a container.
Definition: VTypesHandler.h:99
void openRoute(const SUMOSAXAttributes &attrs)
opens a route for reading
Definition: VTypesHandler.h:58
void addStop(const SUMOSAXAttributes &attrs)
Processing of a stop.
Definition: VTypesHandler.h:84
~VTypesHandler()
Destructor.
void closePersonFlow()
Ends the processing of a person flow.
Definition: VTypesHandler.h:79
void addTranship(const SUMOSAXAttributes &attrs)
Processing of a tranship.
void openFlow(const SUMOSAXAttributes &attrs)
opens a flow for reading
Definition: VTypesHandler.h:61
void addPersonTrip(const SUMOSAXAttributes &attrs)
add a routing request for a walking or intermodal person
Definition: VTypesHandler.h:87
std::map< std::string, SUMOVTypeParameter * > & myVTypes
void closeVType()
Ends the processing of a vehicle type.
void closeRouteDistribution()
closes (ends) the building of a distribution
Definition: VTypesHandler.h:76
void openRouteDistribution(const SUMOSAXAttributes &attrs)
opens a route distribution for reading
Definition: VTypesHandler.h:73
void closeContainer()
Ends the processing of a container.
Definition: VTypesHandler.h:80
void addPerson(const SUMOSAXAttributes &attrs)
Processing of a person.
Definition: VTypesHandler.h:93
void addTransport(const SUMOSAXAttributes &attrs)
Processing of a transport.
void closeRoute(const bool mayBeDisconnected=false)
Definition: VTypesHandler.h:70
void addWalk(const SUMOSAXAttributes &attrs)
add a fully specified walk
Definition: VTypesHandler.h:90
void openRouteFlow(const SUMOSAXAttributes &attrs)
opens a route flow for reading
Definition: VTypesHandler.h:64
void addRide(const SUMOSAXAttributes &attrs)
Processing of a ride.
Definition: VTypesHandler.h:96