Eclipse SUMO - Simulation of Urban MObility
GNEPlanParents.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3 // Copyright (C) 2001-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 /****************************************************************************/
18 // Builds demand objects for netedit
19 /****************************************************************************/
20 #pragma once
21 #include <config.h>
22 
27 #include <netedit/GNENetHelper.h>
34 
35 
36 // ===========================================================================
37 // class declarations
38 // ===========================================================================
39 
40 class GNEViewNet;
41 class GNEEdge;
42 class GNETAZ;
43 class GNEDemandElement;
44 class GNEVehicle;
45 class GNEPerson;
46 class GNEContainer;
47 class GNEUndoList;
48 
49 // ===========================================================================
50 // class definitions
51 // ===========================================================================
52 
55 
56 public:
59 
63 
65  bool checkIntegrity(SumoXMLTag planTag, const GNEDemandElement* parent,
66  const CommonXMLStructure::PlanParameters& planParameters) const;
67 
69  void addChildElements(GNEDemandElement* element);
70 
72  void clear();
73 
77  bool getFromBusStop() const;
78 
80  bool getToBusStop() const;
81 
83  bool getFromTrainStop() const;
84 
86  bool getToTrainStop() const;
87 
89  bool getFromContainerStop() const;
90 
92  bool getToContainerStop() const;
93 
95  bool getFromChargingStation() const;
96 
98  bool getToChargingStation() const;
99 
101  bool getFromParkingArea() const;
102 
104  bool getToParkingArea() const;
105 
107 
109  std::vector<GNEJunction*> getJunctions() const;
110 
112  std::vector<GNEEdge*> getEdges() const;
113 
115  std::vector<GNEAdditional*> getAdditionalElements() const;
116 
118  std::vector<GNEDemandElement*> getDemandElements(GNEDemandElement* parent) const;
119 
121  GNEEdge* fromEdge = nullptr;
122 
124  GNEEdge* toEdge = nullptr;
125 
127  std::vector<GNEEdge*> consecutiveEdges;
128 
131 
134 
136  GNEAdditional* fromTAZ = nullptr;
137 
139  GNEAdditional* toTAZ = nullptr;
140 
143 
146 
149 
152 };
SumoXMLTag
Numbers representing SUMO-XML - element names.
plan parameters (used for group all from-to parameters related with plans)
An Element which don't belong to GNENet but has influence in the simulation.
Definition: GNEAdditional.h:49
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:53
struct used for saving all attribute carriers of net, in different formats
Definition: GNENetHelper.h:75
GNEPlanParents (used for group all plan parents)
std::vector< GNEDemandElement * > getDemandElements(GNEDemandElement *parent) const
get demand elements (used in plan constructors)
void addChildElements(GNEDemandElement *element)
add the given element in the element as child
bool checkIntegrity(SumoXMLTag planTag, const GNEDemandElement *parent, const CommonXMLStructure::PlanParameters &planParameters) const
check integrity between planParameters and GNE elements
bool getFromContainerStop() const
get from containerStop
std::vector< GNEEdge * > consecutiveEdges
edges
bool getFromParkingArea() const
get from parkingArea
GNEAdditional * fromTAZ
from TAZ
void clear()
clear elements
GNEJunction * toJunction
to junction
std::vector< GNEAdditional * > getAdditionalElements() const
get additionalElements (used in plan constructors)
GNEEdge * toEdge
to edge
GNEDemandElement * fromRoute
from route (currently only used by walks)
GNEAdditional * toStoppingPlace
to stoppingPlace
GNEEdge * fromEdge
from edge
bool getToParkingArea() const
get to parkingArea
std::vector< GNEEdge * > getEdges() const
get edges (used in plan constructors)
bool getFromTrainStop() const
get from trainStop
bool getFromChargingStation() const
get from chargingStation
bool getToChargingStation() const
get to chargingStation
GNEJunction * fromJunction
from junction
bool getFromBusStop() const
bool getToContainerStop() const
get to containerStop
std::vector< GNEJunction * > getJunctions() const
get junctions (used in plan constructors)
bool getToTrainStop() const
get to trainStop
GNEAdditional * fromStoppingPlace
from stoppingPlace
GNEPlanParents()
default constructor
GNEAdditional * toTAZ
to TAZ
bool getToBusStop() const
get to busStop
GNEDemandElement * toRoute
to route (currently only used by walks)
Definition: GNETAZ.h:34