Path: blob/main/src/netedit/elements/GNECandidateElement.h
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.h14/// @author Pablo Alvarez Lopez15/// @date May 202016///17// class for candidate elements18/****************************************************************************/19#pragma once20#include <config.h>212223// ===========================================================================24// class definitions25// ===========================================================================2627class GNECandidateElement {2829public:30/// @brief Constructor31GNECandidateElement();3233/// @brief Destructor34~GNECandidateElement();3536/// @brief reset candidate flags37void resetCandidateFlags();3839/// @brief check if this element is a possible candidate40bool isPossibleCandidate() const;4142/// @brief check if this element is a source candidate43bool isSourceCandidate() const;4445/// @brief check if this element is a target candidate46bool isTargetCandidate() const;4748/// @brief check if this element is a special candidate49bool isSpecialCandidate() const;5051/// @brief check if this element is a conflicted candidate52bool isConflictedCandidate() const;5354/// @brief check if this element is a invalid candidate55bool isInvalidCandidate() const;5657/// @brief set element as possible candidate58void setPossibleCandidate(const bool value);5960/// @brief set element as source candidate61void setSourceCandidate(const bool value);6263/// @brief set element as target candidate64void setTargetCandidate(const bool value);6566/// @brief set element as special candidate67void setSpecialCandidate(const bool value);6869/// @brief set element as conflicted candidate70void setConflictedCandidate(const bool value);7172/// @brief set element as invalid candidate73void setInvalidCandidate(const bool value);7475/// @name functions for reachability76/// @{7778/// @brief get current reachability (traveltime)79double getReachability() const;8081/// @brief set current reachability (traveltime)82void setReachability(const double reachability);8384/// @brief reset reachability (traveltime)85void resetReachability();8687/// @}8889protected:90/// @brief flag to mark this element as possible candidate91bool myPossibleCandidate = false;9293/// @brief flag to mark this element as source candidate94bool mySourceCandidate = false;9596/// @brief flag to mark this element as target candidate97bool myTargetCandidate = false;9899/// @brief flag to mark this element as special candidate100bool mySpecialCandidate = false;101102/// @brief flag to mark this element as conflicted candidate103bool myConflictedCandidate = false;104105/// @brief flag to mark this element as invalid candidate106bool myInvalidCandidate = false;107108/// @brief value for reachability109double myReachability = -1;110111private:112/// @brief Invalidated copy constructor.113GNECandidateElement(const GNECandidateElement&) = delete;114115/// @brief Invalidated assignment operator116GNECandidateElement& operator=(const GNECandidateElement& src) = delete;117};118119120