Path: blob/main/src/netimport/vissim/tempstructs/NIVissimDisturbance.h
169684 views
/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2002-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 NIVissimDisturbance.h14/// @author Daniel Krajzewicz15/// @author Michael Behrisch16/// @date Sept 200217///18// -------------------19/****************************************************************************/20#pragma once21#include <config.h>2223#include <map>24#include <string>25#include <utils/geom/AbstractPoly.h>26#include <netbuild/NBConnection.h>27#include "NIVissimExtendedEdgePoint.h"28#include "NIVissimBoundedClusterObject.h"29#include "NIVissimNodeParticipatingEdgeVector.h"303132// ===========================================================================33// class declarations34// ===========================================================================35class NBNode;36class NBEdge;37class NBDistrictCont;3839class NIVissimDisturbance40: public NIVissimBoundedClusterObject {41public:42NIVissimDisturbance(int id, const std::string& name,43const NIVissimExtendedEdgePoint& edge,44const NIVissimExtendedEdgePoint& by);45virtual ~NIVissimDisturbance();46void computeBounding();47bool addToNode(NBNode* node, NBDistrictCont& dc,48NBNodeCont& nc, NBEdgeCont& ec);49int getEdgeID() const {50return myEdge.getEdgeID();51}52int getDisturbanceID() const {53return myDisturbance.getEdgeID();54}55NBConnection getConnection(NBNode* node, int aedgeid);5657public:58static bool dictionary(const std::string& name,59const NIVissimExtendedEdgePoint& edge,60const NIVissimExtendedEdgePoint& by);61static bool dictionary(int id, NIVissimDisturbance* o);62static NIVissimDisturbance* dictionary(int id);63static std::vector<int> getWithin(const AbstractPoly& poly);64static void clearDict();65static void dict_SetDisturbances();66static void reportRefused();6768private:69int myID;70int myNode;71std::string myName;72NIVissimExtendedEdgePoint myEdge;73NIVissimExtendedEdgePoint myDisturbance;7475typedef std::map<int, NIVissimDisturbance*> DictType;76static DictType myDict;77static int myRunningID;78static int refusedProhibits;79};808182