Path: blob/main/src/netedit/elements/network/GNELaneTemplate.cpp
185790 views
/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.3// This program and the accompanying materials are made available under the4// terms of the Eclipse Public License 2.0 which is available at5// https://www.eclipse.org/legal/epl-2.0/6// This Source Code may also be made available under the following Secondary7// Licenses when the conditions for such availability set forth in the Eclipse8// Public License 2.0 are satisfied: GNU General Public License, version 29// or later which is available at10// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later12/****************************************************************************/13/// @file GNELaneTemplate.cpp14/// @author Pablo Alvarez Lopez15/// @date Dec 202116///17// Template for lanes18/****************************************************************************/1920#include <netedit/elements/network/GNELane.h>2122#include "GNELaneTemplate.h"2324// ===========================================================================25// members methods26// ===========================================================================2728GNELaneTemplate::GNELaneTemplate(const GNELane* lane) :29GNEAttributeCarrier(SUMO_TAG_LANE, lane->getNet()),30myLane(lane) {31}323334GNELaneTemplate::~GNELaneTemplate() {35}363738GNEHierarchicalElement*39GNELaneTemplate::getHierarchicalElement() {40return nullptr;41}424344GNEMoveElement*45GNELaneTemplate::getMoveElement() const {46return nullptr;47}484950Parameterised*51GNELaneTemplate::getParameters() {52return nullptr;53}545556const Parameterised*57GNELaneTemplate::getParameters() const {58return nullptr;59}606162FileBucket*63GNELaneTemplate::getFileBucket() const {64return myLane->getFileBucket();65}666768GUIGlObject*69GNELaneTemplate::getGUIGlObject() {70return nullptr;71}727374const GUIGlObject*75GNELaneTemplate::getGUIGlObject() const {76return nullptr;77}787980void81GNELaneTemplate::updateGeometry() {82throw InvalidArgument("cannot be called in templates");83}848586bool87GNELaneTemplate::checkDrawFromContour() const {88return false;89}909192bool93GNELaneTemplate::checkDrawToContour() const {94return false;95}969798bool99GNELaneTemplate::checkDrawRelatedContour() const {100return false;101}102103104bool105GNELaneTemplate::checkDrawOverContour() const {106return false;107}108109110bool111GNELaneTemplate::checkDrawDeleteContour() const {112return false;113}114115116bool117GNELaneTemplate::checkDrawDeleteContourSmall() const {118return false;119}120121122bool123GNELaneTemplate::checkDrawSelectContour() const {124return false;125}126127128bool129GNELaneTemplate::checkDrawMoveContour() const {130return false;131}132133134std::string135GNELaneTemplate::getAttribute(SumoXMLAttr key) const {136return myLane->getAttribute(key);137}138139140double141GNELaneTemplate::getAttributeDouble(SumoXMLAttr key) const {142return myLane->getAttributeDouble(key);143}144145146Position147GNELaneTemplate::getAttributePosition(SumoXMLAttr key) const {148return getCommonAttributePosition(key);149}150151152PositionVector153GNELaneTemplate::getAttributePositionVector(SumoXMLAttr key) const {154return myLane->getAttributePositionVector(key);155}156157158void159GNELaneTemplate::setAttribute(SumoXMLAttr /*key*/, const std::string& /*value*/, GNEUndoList* /*undoList*/) {160throw InvalidArgument("cannot be called in templates");161}162163164bool165GNELaneTemplate::isValid(SumoXMLAttr /*key*/, const std::string& /*value*/) {166throw InvalidArgument("cannot be called in templates");167}168169170bool171GNELaneTemplate::isAttributeEnabled(SumoXMLAttr /*key*/) const {172// All attributes are disabled in templates173return false;174}175176177std::string178GNELaneTemplate::getPopUpID() const {179return myLane->getPopUpID();180}181182183std::string184GNELaneTemplate::getHierarchyName() const {185return myLane->getHierarchyName();186}187188// ===========================================================================189// private190// ===========================================================================191192void193GNELaneTemplate::setAttribute(SumoXMLAttr /*key*/, const std::string& /*value*/) {194throw InvalidArgument("cannot be called in templates");195}196197/****************************************************************************/198199200