Path: blob/main/src/utils/gui/globjects/GUIGlObject_AbstractAdd.h
169684 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 GUIGlObject_AbstractAdd.h14/// @author Daniel Krajzewicz15/// @author Jakob Erdmann16/// @author Michael Behrisch17/// @date 200418///19// Base class for additional objects (detectors etc.)20/****************************************************************************/21#pragma once22#include <config.h>2324#include <vector>25#include <map>2627#include "GUIGlObjectTypes.h"28#include "GUIGlObject.h"293031// ===========================================================================32// class definitions33// ===========================================================================34/**35* @class GUIGlObject_AbstractAdd36*/37class GUIGlObject_AbstractAdd : public GUIGlObject {3839public:40/// @brief constructor41GUIGlObject_AbstractAdd(GUIGlObjectType type, const std::string& id, FXIcon* icon);4243/// @brief destructor44~GUIGlObject_AbstractAdd();4546/// @brief Clears the dictionary (the objects will not be deleted)47static void clearDictionary();4849/// @brief Returns a named object50static GUIGlObject_AbstractAdd* get(const std::string& name);5152/// @brief Removes an object53static void remove(GUIGlObject_AbstractAdd* o);5455/// @brief Returns the list of all additional objects56static const std::vector<GUIGlObject_AbstractAdd*>& getObjectList();5758/// @brief Returns the list of gl-ids of all additional objects that match the given type59static std::vector<GUIGlID> getIDList(GUIGlObjectType typeFilter);6061protected:62/// @brief Map from names of loaded additional objects to the objects themselves63static std::map<std::string, GUIGlObject_AbstractAdd*> myObjects;6465/// @brief The list of all additional objects currently loaded66static std::vector<GUIGlObject_AbstractAdd*> myObjectList;67};686970