Eclipse SUMO - Simulation of Urban MObility
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
GNEHierarchicalStructureChildren.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-2025 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// Structure for GNEHierarchicalElements centered in children
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
23#include <vector>
24#include <set>
25
26// ===========================================================================
27// template declarations
28// ===========================================================================
29
30template <typename ChildType>
31using GNEHierarchicalContainerChildren = std::vector<ChildType>;
32
33template <typename ChildType>
34using GNEHierarchicalContainerChildrenSet = std::set<ChildType>;
35
36// ===========================================================================
37// class declarations
38// ===========================================================================
39
41class GNEJunction;
42class GNEEdge;
43class GNELane;
44class GNEAdditional;
47class GNEGenericData;
49
50// ===========================================================================
51// class definitions
52// ===========================================================================
53
std::set< ChildType > GNEHierarchicalContainerChildrenSet
std::vector< ChildType > GNEHierarchicalContainerChildren
A road/street connecting two junctions (netedit-version)
Definition GNEEdge.h:53
Hierarchical structure used for keep children.
GNEHierarchicalContainerChildrenSet< GNETAZSourceSink * > myChildSourceSinks
children TAZSourceSinks elements (set)
GNEHierarchicalContainerChildren< GNEJunction * > myChildJunctions
children junctions
GNEHierarchicalContainerChildren< GNEGenericData * > myChildGenericDatas
children genericdata elements
void remove(ChildType child)
remove child element
void add(ChildType child)
add child element
void replaceAll(const GNEHierarchicalContainerChildren< ChildType > &children)
update all children
GNEHierarchicalContainerChildren< GNELane * > myChildLanes
children lanes
GNEHierarchicalContainerChildren< GNEDemandElement * > myChildDemandElements
children demand elements
const GNEHierarchicalContainerChildren< ChildType > & get() const
get children
GNEHierarchicalContainerChildren< GNEEdge * > myChildEdges
children edges
GNEHierarchicalContainerChildren< GNEAdditional * > myChildAdditionals
children additional elements
const GNEHierarchicalContainerChildrenSet< ChildType > & getSet() const
get children (set)
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition GNELane.h:46