Eclipse SUMO - Simulation of Urban MObility
GNEHierarchicalContainer.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-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 // Container for GNEHierarchicalElements
19 /****************************************************************************/
20 #include <config.h>
21 
22 #include <netedit/GNENet.h>
23 
24 // ===========================================================================
25 // static member definitions
26 // ===========================================================================
27 
29 
30 // ===========================================================================
31 // member method definitions
32 // ===========================================================================
33 
35 
36 
38  const std::vector<GNEJunction*>& parentJunctions,
39  const std::vector<GNEEdge*>& parentEdges,
40  const std::vector<GNELane*>& parentLanes,
41  const std::vector<GNEAdditional*>& parentAdditionals,
42  const std::vector<GNEShape*>& parentShapes,
43  const std::vector<GNETAZElement*>& parentTAZElements,
44  const std::vector<GNEDemandElement*>& ParentDemandElements,
45  const std::vector<GNEGenericData*>& parentGenericDatas):
46  myParentJunctions(parentJunctions),
47  myParentEdges(parentEdges),
48  myParentLanes(parentLanes),
49  myParentAdditionals(parentAdditionals),
50  myParentShapes(parentShapes),
51  myParentTAZElements(parentTAZElements),
52  myParentDemandElements(ParentDemandElements),
53  myParentGenericDatas(parentGenericDatas) {
54 }
55 
56 
57 size_t
59  return (
60  myParentJunctions.size() +
61  myParentEdges.size() +
62  myParentLanes.size() +
63  myParentAdditionals.size() +
64  myParentShapes.size() +
65  myParentTAZElements.size() +
66  myParentDemandElements.size() +
67  myParentGenericDatas.size() +
68  myChildJunctions.size() +
69  myChildEdges.size() +
70  myChildLanes.size() +
71  myChildAdditionals.size() +
72  myChildShapes.size() +
73  myChildTAZElements.size() +
74  myChildDemandElements.size() +
75  myChildGenericDatas.size()
76  );
77 }
78 
79 
80 template <> void
82  // check junction
83  if (checkContainer && (std::find(myParentJunctions.begin(), myParentJunctions.end(), junction) != myParentJunctions.end())) {
84  throw ProcessError(junction->getTagStr() + " with ID='" + junction->getID() + "' was already inserted in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
85  } else {
86  myParentJunctions.push_back(junction);
87  }
88 }
89 
90 
91 template <> void
93  // check edge
94  if (checkContainer && (std::find(myParentEdges.begin(), myParentEdges.end(), edge) != myParentEdges.end())) {
95  throw ProcessError(edge->getTagStr() + " with ID='" + edge->getID() + "' was already inserted in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
96  } else {
97  myParentEdges.push_back(edge);
98  }
99 }
100 
101 
102 template <> void
104  // check lane
105  if (checkContainer && (std::find(myParentLanes.begin(), myParentLanes.end(), lane) != myParentLanes.end())) {
106  throw ProcessError(lane->getTagStr() + " with ID='" + lane->getID() + "' was already inserted in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
107  } else {
108  myParentLanes.push_back(lane);
109  }
110 }
111 
112 
113 template <> void
115  // check additional
116  if (checkContainer && (std::find(myParentAdditionals.begin(), myParentAdditionals.end(), additional) != myParentAdditionals.end())) {
117  throw ProcessError(additional->getTagStr() + " with ID='" + additional->getID() + "' was already inserted in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
118  } else {
119  myParentAdditionals.push_back(additional);
120  }
121 }
122 
123 
124 template <> void
126  // check shape
127  if (checkContainer && (std::find(myParentShapes.begin(), myParentShapes.end(), shape) != myParentShapes.end())) {
128  throw ProcessError(shape->getTagStr() + " with ID='" + shape->getID() + "' was already inserted in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
129  } else {
130  myParentShapes.push_back(shape);
131  }
132 }
133 
134 
135 template <> void
137  // check TAZElement
138  if (checkContainer && (std::find(myParentTAZElements.begin(), myParentTAZElements.end(), TAZElement) != myParentTAZElements.end())) {
139  throw ProcessError(TAZElement->getTagStr() + " with ID='" + TAZElement->getID() + "' was already inserted in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
140  } else {
141  myParentTAZElements.push_back(TAZElement);
142  }
143 }
144 
145 
146 template <> void
148  // check TAZElement
149  if (checkContainer && (std::find(myParentDemandElements.begin(), myParentDemandElements.end(), demandElement) != myParentDemandElements.end())) {
150  throw ProcessError(demandElement->getTagStr() + " with ID='" + demandElement->getID() + "' was already inserted in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
151  } else {
152  myParentDemandElements.push_back(demandElement);
153  }
154 }
155 
156 
157 template <> void
159  // check generic data
160  if (checkContainer && (std::find(myParentGenericDatas.begin(), myParentGenericDatas.end(), genericData) != myParentGenericDatas.end())) {
161  throw ProcessError(genericData->getTagStr() + " with ID='" + genericData->getID() + "' was already inserted in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
162  } else {
163  myParentGenericDatas.push_back(genericData);
164  }
165 }
166 
167 
168 template <> void
170  // check junction
171  auto it = std::find(myParentJunctions.begin(), myParentJunctions.end(), junction);
172  if (checkContainer && (it == myParentJunctions.end())) {
173  throw ProcessError(junction->getTagStr() + " with ID='" + junction->getID() + "' doesn't exist in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
174  } else {
175  myParentJunctions.erase(it);
176  }
177 }
178 
179 
180 template <> void
182  // check edge
183  auto it = std::find(myParentEdges.begin(), myParentEdges.end(), edge);
184  if (checkContainer && (it == myParentEdges.end())) {
185  throw ProcessError(edge->getTagStr() + " with ID='" + edge->getID() + "' doesn't exist in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
186  } else {
187  myParentEdges.erase(it);
188  }
189 }
190 
191 
192 template <> void
194  // check lane
195  auto it = std::find(myParentLanes.begin(), myParentLanes.end(), lane);
196  if (checkContainer && (it == myParentLanes.end())) {
197  throw ProcessError(lane->getTagStr() + " with ID='" + lane->getID() + "' doesn't exist in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
198  } else {
199  myParentLanes.erase(it);
200  }
201 }
202 
203 
204 template <> void
206  // check additional
207  auto it = std::find(myParentAdditionals.begin(), myParentAdditionals.end(), additional);
208  if (checkContainer && (it == myParentAdditionals.end())) {
209  throw ProcessError(additional->getTagStr() + " with ID='" + additional->getID() + "' doesn't exist in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
210  } else {
211  myParentAdditionals.erase(it);
212  }
213 }
214 
215 
216 template <> void
218  // check shape
219  auto it = std::find(myParentShapes.begin(), myParentShapes.end(), shape);
220  if (checkContainer && (it == myParentShapes.end())) {
221  throw ProcessError(shape->getTagStr() + " with ID='" + shape->getID() + "' doesn't exist in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
222  } else {
223  myParentShapes.erase(it);
224  }
225 }
226 
227 
228 template <> void
230  // check TAZElement
231  auto it = std::find(myParentTAZElements.begin(), myParentTAZElements.end(), TAZElement);
232  if (checkContainer && (it == myParentTAZElements.end())) {
233  throw ProcessError(TAZElement->getTagStr() + " with ID='" + TAZElement->getID() + "' doesn't exist in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
234  } else {
235  myParentTAZElements.erase(it);
236  }
237 }
238 
239 
240 template <> void
242  // check TAZElement
243  auto it = std::find(myParentDemandElements.begin(), myParentDemandElements.end(), demandElement);
244  if (checkContainer && (it == myParentDemandElements.end())) {
245  throw ProcessError(demandElement->getTagStr() + " with ID='" + demandElement->getID() + "' doesn't exist in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
246  } else {
247  myParentDemandElements.erase(it);
248  }
249 }
250 
251 
252 template <> void
254  // check generic data
255  auto it = std::find(myParentGenericDatas.begin(), myParentGenericDatas.end(), genericData);
256  if (checkContainer && (it == myParentGenericDatas.end())) {
257  throw ProcessError(genericData->getTagStr() + " with ID='" + genericData->getID() + "' doesn't exist in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
258  } else {
259  myParentGenericDatas.erase(it);
260  }
261 }
262 
263 
264 template <> void
266  // check junction
267  if (checkContainer && (std::find(myChildJunctions.begin(), myChildJunctions.end(), junction) != myChildJunctions.end())) {
268  throw ProcessError(junction->getTagStr() + " with ID='" + junction->getID() + "' was already inserted in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
269  } else {
270  myChildJunctions.push_back(junction);
271  }
272 }
273 
274 
275 template <> void
277  // check edge
278  if (checkContainer && (std::find(myChildEdges.begin(), myChildEdges.end(), edge) != myChildEdges.end())) {
279  throw ProcessError(edge->getTagStr() + " with ID='" + edge->getID() + "' was already inserted in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
280  } else {
281  myChildEdges.push_back(edge);
282  }
283 }
284 
285 
286 template <> void
288  // check lane
289  if (checkContainer && (std::find(myChildLanes.begin(), myChildLanes.end(), lane) != myChildLanes.end())) {
290  throw ProcessError(lane->getTagStr() + " with ID='" + lane->getID() + "' was already inserted in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
291  } else {
292  myChildLanes.push_back(lane);
293  }
294 }
295 
296 
297 template <> void
299  // check additional
300  if (checkContainer && (std::find(myChildAdditionals.begin(), myChildAdditionals.end(), additional) != myChildAdditionals.end())) {
301  throw ProcessError(additional->getTagStr() + " with ID='" + additional->getID() + "' was already inserted in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
302  } else {
303  myChildAdditionals.push_back(additional);
304  }
305 }
306 
307 
308 template <> void
310  // check shape
311  if (checkContainer && (std::find(myChildShapes.begin(), myChildShapes.end(), shape) != myChildShapes.end())) {
312  throw ProcessError(shape->getTagStr() + " with ID='" + shape->getID() + "' was already inserted in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
313  } else {
314  myChildShapes.push_back(shape);
315  }
316 }
317 
318 
319 template <> void
321  // check TAZElement
322  if (checkContainer && (std::find(myChildTAZElements.begin(), myChildTAZElements.end(), TAZElement) != myChildTAZElements.end())) {
323  throw ProcessError(TAZElement->getTagStr() + " with ID='" + TAZElement->getID() + "' was already inserted in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
324  } else {
325  myChildTAZElements.push_back(TAZElement);
326  }
327 }
328 
329 
330 template <> void
332  // disabled due VIA Attributes
333  /*
334  // check demand element
335  if (checkContainer && (std::find(myChildDemandElements.begin(), myChildDemandElements.end(), demandElement) != myChildDemandElements.end())) {
336  throw ProcessError(demandElement->getTagStr() + " with ID='" + demandElement->getID() + "' was already inserted in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
337  } else {
338  myChildDemandElements.push_back(demandElement);
339  }
340  */
341  myChildDemandElements.push_back(demandElement);
342 
343 }
344 
345 
346 template <> void
348  // check generic data
349  if (checkContainer && (std::find(myChildGenericDatas.begin(), myChildGenericDatas.end(), genericData) != myChildGenericDatas.end())) {
350  throw ProcessError(genericData->getTagStr() + " with ID='" + genericData->getID() + "' was already inserted in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
351  } else {
352  myChildGenericDatas.push_back(genericData);
353  }
354 }
355 
356 
357 template <> void
359  // check junction
360  auto it = std::find(myChildJunctions.begin(), myChildJunctions.end(), junction);
361  if (checkContainer && (it == myChildJunctions.end())) {
362  throw ProcessError(junction->getTagStr() + " with ID='" + junction->getID() + "' doesn't exist in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
363  } else {
364  myChildJunctions.erase(it);
365  }
366 }
367 
368 
369 template <> void
371  // check edge
372  auto it = std::find(myChildEdges.begin(), myChildEdges.end(), edge);
373  if (checkContainer && (it == myChildEdges.end())) {
374  throw ProcessError(edge->getTagStr() + " with ID='" + edge->getID() + "' doesn't exist in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
375  } else {
376  myChildEdges.erase(it);
377  }
378 }
379 
380 
381 template <> void
383  // check lane
384  auto it = std::find(myChildLanes.begin(), myChildLanes.end(), lane);
385  if (checkContainer && (it == myChildLanes.end())) {
386  throw ProcessError(lane->getTagStr() + " with ID='" + lane->getID() + "' doesn't exist in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
387  } else {
388  myChildLanes.erase(it);
389  }
390 }
391 
392 
393 template <> void
395  // check additional
396  auto it = std::find(myChildAdditionals.begin(), myChildAdditionals.end(), additional);
397  if (checkContainer && (it == myChildAdditionals.end())) {
398  throw ProcessError(additional->getTagStr() + " with ID='" + additional->getID() + "' doesn't exist in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
399  } else {
400  myChildAdditionals.erase(it);
401  }
402 }
403 
404 
405 template <> void
407  // check shape
408  auto it = std::find(myChildShapes.begin(), myChildShapes.end(), shape);
409  if (checkContainer && (it == myChildShapes.end())) {
410  throw ProcessError(shape->getTagStr() + " with ID='" + shape->getID() + "' doesn't exist in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
411  } else {
412  myChildShapes.erase(it);
413  }
414 }
415 
416 
417 template <> void
419  // check TAZElement
420  auto it = std::find(myChildTAZElements.begin(), myChildTAZElements.end(), TAZElement);
421  if (checkContainer && (it == myChildTAZElements.end())) {
422  throw ProcessError(TAZElement->getTagStr() + " with ID='" + TAZElement->getID() + "' doesn't exist in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
423  } else {
424  myChildTAZElements.erase(it);
425  }
426 }
427 
428 
429 template <> void
431  // check demand element
432  auto it = std::find(myChildDemandElements.begin(), myChildDemandElements.end(), demandElement);
433  if (checkContainer && (it == myChildDemandElements.end())) {
434  throw ProcessError(demandElement->getTagStr() + " with ID='" + demandElement->getID() + "' doesn't exist in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
435  } else {
436  myChildDemandElements.erase(it);
437  }
438 }
439 
440 
441 template <> void
443  // check generic data
444  auto it = std::find(myChildGenericDatas.begin(), myChildGenericDatas.end(), genericData);
445  if (checkContainer && (it == myChildGenericDatas.end())) {
446  throw ProcessError(genericData->getTagStr() + " with ID='" + genericData->getID() + "' doesn't exist in " + hierarchicalElement->getTagStr() + " with ID='" + hierarchicalElement->getID() + "'");
447  } else {
448  myChildGenericDatas.erase(it);
449  }
450 }
451 
452 
453 template<> const std::vector<GNEJunction*>&
455  return myParentJunctions;
456 }
457 
458 
459 template<> const std::vector<GNEEdge*>&
461  return myParentEdges;
462 }
463 
464 
465 template<> const std::vector<GNELane*>&
467  return myParentLanes;
468 }
469 
470 
471 template<> const std::vector<GNEAdditional*>&
473  return myParentAdditionals;
474 }
475 
476 
477 template<> const std::vector<GNEShape*>&
479  return myParentShapes;
480 }
481 
482 
483 template<> const std::vector<GNETAZElement*>&
485  return myParentTAZElements;
486 }
487 
488 
489 template<> const std::vector<GNEDemandElement*>&
491  return myParentDemandElements;
492 }
493 
494 
495 template<> const std::vector<GNEGenericData*>&
497  return myParentGenericDatas;
498 }
499 
500 
501 template<> void
502 GNEHierarchicalContainer::setParents(const std::vector<GNEJunction*>& newParents) {
503  myParentJunctions = newParents;
504 }
505 
506 
507 template<> void
508 GNEHierarchicalContainer::setParents(const std::vector<GNEEdge*>& newParents) {
509  myParentEdges = newParents;
510 }
511 
512 
513 template<> void
514 GNEHierarchicalContainer::setParents(const std::vector<GNELane*>& newParents) {
515  myParentLanes = newParents;
516 }
517 
518 
519 template<> void
520 GNEHierarchicalContainer::setParents(const std::vector<GNEAdditional*>& newParents) {
521  myParentAdditionals = newParents;
522 }
523 
524 
525 template<> void
526 GNEHierarchicalContainer::setParents(const std::vector<GNEShape*>& newParents) {
527  myParentShapes = newParents;
528 }
529 
530 
531 template<> void
532 GNEHierarchicalContainer::setParents(const std::vector<GNETAZElement*>& newParents) {
533  myParentTAZElements = newParents;
534 }
535 
536 
537 template<> void
538 GNEHierarchicalContainer::setParents(const std::vector<GNEDemandElement*>& newParents) {
539  myParentDemandElements = newParents;
540 }
541 
542 
543 template<> void
544 GNEHierarchicalContainer::setParents(const std::vector<GNEGenericData*>& newParents) {
545  myParentGenericDatas = newParents;
546 }
547 
548 
549 template<> const std::vector<GNEJunction*>&
551  return myChildJunctions;
552 }
553 
554 
555 template<> const std::vector<GNEEdge*>&
557  return myChildEdges;
558 }
559 
560 
561 template<> const std::vector<GNELane*>&
563  return myChildLanes;
564 }
565 
566 
567 template<> const std::vector<GNEAdditional*>&
569  return myChildAdditionals;
570 }
571 
572 
573 template<> const std::vector<GNEShape*>&
575  return myChildShapes;
576 }
577 
578 
579 template<> const std::vector<GNETAZElement*>&
581  return myChildTAZElements;
582 }
583 
584 
585 template<> const std::vector<GNEDemandElement*>&
587  return myChildDemandElements;
588 }
589 
590 
591 template<> const std::vector<GNEGenericData*>&
593  return myChildGenericDatas;
594 }
595 
596 
597 template<> void
598 GNEHierarchicalContainer::setChildren(const std::vector<GNEJunction*>& newChildren) {
599  myChildJunctions = newChildren;
600 }
601 
602 
603 template<> void
604 GNEHierarchicalContainer::setChildren(const std::vector<GNEEdge*>& newChildren) {
605  myChildEdges = newChildren;
606 }
607 
608 
609 template<> void
610 GNEHierarchicalContainer::setChildren(const std::vector<GNELane*>& newChildren) {
611  myChildLanes = newChildren;
612 }
613 
614 
615 template<> void
616 GNEHierarchicalContainer::setChildren(const std::vector<GNEAdditional*>& newChildren) {
617  myChildAdditionals = newChildren;
618 }
619 
620 
621 template<> void
622 GNEHierarchicalContainer::setChildren(const std::vector<GNEShape*>& newChildren) {
623  myChildShapes = newChildren;
624 }
625 
626 
627 template<> void
628 GNEHierarchicalContainer::setChildren(const std::vector<GNETAZElement*>& newChildren) {
629  myChildTAZElements = newChildren;
630 }
631 
632 
633 template<> void
634 GNEHierarchicalContainer::setChildren(const std::vector<GNEDemandElement*>& newChildren) {
635  myChildDemandElements = newChildren;
636 }
637 
638 
639 template<> void
640 GNEHierarchicalContainer::setChildren(const std::vector<GNEGenericData*>& newChildren) {
641  myChildGenericDatas = newChildren;
642 }
643 
644 /****************************************************************************/
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:48
const std::string & getID() const
get ID
virtual const std::string & getID() const =0
return ID of object
const std::string & getTagStr() const
get tag assigned to this object in string format
An Element which don't belongs to GNENet but has influency in the simulation.
const std::string & getID() const
get ID
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:53
An Element which don't belongs to GNENet but has influency in the simulation.
const std::string & getID() const
get ID
std::vector< GNEEdge * > myChildEdges
vector with the child edges
std::vector< GNEDemandElement * > myChildDemandElements
vector with the child demand elements
std::vector< GNEDemandElement * > myParentDemandElements
vector of parent demand elements
GNEHierarchicalContainer()
default constructor
std::vector< GNELane * > myParentLanes
vector of parent lanes
void addParentElement(const GNEHierarchicalElement *hierarchicalElement, T *element)
add parent element
size_t getContainerSize() const
get container size
std::vector< GNEAdditional * > myChildAdditionals
vector with the child additional
const T & getParents() const
get parents
std::vector< GNEEdge * > myParentEdges
vector of parent edges
void addChildElement(const GNEHierarchicalElement *hierarchicalElement, T *element)
add child element
std::vector< GNETAZElement * > myParentTAZElements
vector of parent TAZElements
std::vector< GNEJunction * > myChildJunctions
vector with the child junctions
const T & getChildren() const
get children
void removeParentElement(const GNEHierarchicalElement *hierarchicalElement, T *element)
remove parent element
std::vector< GNEJunction * > myParentJunctions
vector of parent junctions
std::vector< GNEShape * > myParentShapes
vector of parent shapes
std::vector< GNEAdditional * > myParentAdditionals
vector of parent additionals
std::vector< GNEGenericData * > myParentGenericDatas
vector of parent generic datas
std::vector< GNETAZElement * > myChildTAZElements
vector with the child TAZ Elements
std::vector< GNEShape * > myChildShapes
vector with the child lanes
static const bool checkContainer
flag for enable/disable check duplicate elements (only used for debug purposes)
std::vector< GNEGenericData * > myChildGenericDatas
vector with the generic child data elements
void setChildren(const T &newChildren)
set children
void setParents(const T &newParents)
set parents
void removeChildElement(const GNEHierarchicalElement *hierarchicalElement, T *element)
remove child element
std::vector< GNELane * > myChildLanes
vector with the child lanes
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:46
const std::string & getID() const
get ID
const std::string & getID() const
get ID (all shapes have one)
Definition: GNEShape.cpp:53
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNETAZElement.h:45
const std::string & getID() const
get ID