/****************************************************************************/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 GUIInstantInductLoop.h14/// @author Daniel Krajzewicz15/// @date Aug 200316///17// The gui-version of the MSInstantInductLoop18/****************************************************************************/19#pragma once20#include <config.h>2122#include <utils/foxtools/fxheader.h>23#include <microsim/output/MSInstantInductLoop.h>24#include <utils/geom/Position.h>25#include "GUIDetectorWrapper.h"262728// ===========================================================================29// class definitions30// ===========================================================================31/**32* @class GUIInstantInductLoop33* @brief The gui-version of the MSInstantInductLoop34*/35class GUIInstantInductLoop : public MSInstantInductLoop {36public:37/**38* @brief Constructor.39* @param[in] id Unique id40* @param[in] od The device to write to41* @param[in] lane Lane where detector woks on.42* @param[in] position Position of the detector within the lane.43*/44GUIInstantInductLoop(const std::string& id, OutputDevice& od,45MSLane* const lane, double positionInMeters,46const std::string name, const std::string& vTypes,47const std::string& nextEdges);484950/// @brief Destructor51~GUIInstantInductLoop();52535455/** @brief Returns this detector's visualisation-wrapper56* @return The wrapper representing the detector57*/58virtual GUIDetectorWrapper* buildDetectorGUIRepresentation();596061public:62/**63* @class GUIInstantInductLoop::MyWrapper64* @brief A MSInductLoop-visualiser65*/66class MyWrapper : public GUIDetectorWrapper {67public:68/// @brief Constructor69MyWrapper(GUIInstantInductLoop& detector, double pos);7071/// @brief Destructor72~MyWrapper();7374/// @name inherited from GUIGlObject75//@{7677/** @brief Returns an own parameter window78*79* @param[in] app The application needed to build the parameter window80* @param[in] parent The parent window needed to build the parameter window81* @return The built parameter window82* @see GUIGlObject::getParameterWindow83*/84GUIParameterTableWindow* getParameterWindow(85GUIMainWindow& app, GUISUMOAbstractView& parent);8687/// @brief return exaggeration associated with this GLObject88double getExaggeration(const GUIVisualizationSettings& s) const;8990/** @brief Returns the boundary to which the view shall be centered in order to show the object91*92* @return The boundary the object is within93* @see GUIGlObject::getCenteringBoundary94*/95Boundary getCenteringBoundary() const;9697/** @brief Draws the object98* @param[in] s The settings for the current view (may influence drawing)99* @see GUIGlObject::drawGL100*/101void drawGL(const GUIVisualizationSettings& s) const;102//@}103104/// @brief Returns the detector itself105GUIInstantInductLoop& getLoop();106107private:108/// @brief The wrapped detector109GUIInstantInductLoop& myDetector;110111/// @brief The detector's boundary112Boundary myBoundary;113114/// @brief The position in full-geometry mode115Position myFGPosition;116117/// @brief The rotation in full-geometry mode118double myFGRotation;119120/// @brief The position on the lane121double myPosition;122123private:124/// @brief Invalidated copy constructor.125MyWrapper(const MyWrapper&);126127/// @brief Invalidated assignment operator.128MyWrapper& operator=(const MyWrapper&);129130};131132133/// @brief Mutex preventing parallel read/write access to internal MSInductLoop state134mutable FXMutex myLock;135136};137138139