Path: blob/main/src/netedit/elements/GNECandidateElement.cpp
169678 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 GNECandidateElement.cpp14/// @author Pablo Alvarez Lopez15/// @date May 202016///17// class for candidate elements18/****************************************************************************/1920#include "GNECandidateElement.h"2122// ===========================================================================23// method definitions24// ===========================================================================252627GNECandidateElement::GNECandidateElement() {}282930GNECandidateElement::~GNECandidateElement() {}313233void34GNECandidateElement::resetCandidateFlags() {35myPossibleCandidate = false;36mySourceCandidate = false;37myTargetCandidate = false;38mySpecialCandidate = false;39myConflictedCandidate = false;40myInvalidCandidate = false;41}424344bool45GNECandidateElement::isPossibleCandidate() const {46return myPossibleCandidate;47}48495051bool52GNECandidateElement::isSourceCandidate() const {53return mySourceCandidate;54}555657bool58GNECandidateElement::isTargetCandidate() const {59return myTargetCandidate;60}616263bool64GNECandidateElement::isSpecialCandidate() const {65return mySpecialCandidate;66}676869bool70GNECandidateElement::isConflictedCandidate() const {71return myConflictedCandidate;72}737475bool76GNECandidateElement::isInvalidCandidate() const {77return myInvalidCandidate;78}798081void82GNECandidateElement::setPossibleCandidate(const bool value) {83myPossibleCandidate = value;84}858687void88GNECandidateElement::setSourceCandidate(const bool value) {89mySourceCandidate = value;90}919293void94GNECandidateElement::setTargetCandidate(const bool value) {95myTargetCandidate = value;96}979899void100GNECandidateElement::setSpecialCandidate(const bool value) {101mySpecialCandidate = value;102}103104105void106GNECandidateElement::setConflictedCandidate(const bool value) {107myConflictedCandidate = value;108}109110111void112GNECandidateElement::setInvalidCandidate(const bool value) {113myInvalidCandidate = value;114}115116117double118GNECandidateElement::getReachability() const {119return myReachability;120}121122123void124GNECandidateElement::setReachability(const double reachability) {125myReachability = reachability;126}127128129void130GNECandidateElement::resetReachability() {131myReachability = -1;132}133134/****************************************************************************/135136137