/****************************************************************************/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 IDSupplier.h14/// @author Daniel Krajzewicz15/// @author Jakob Erdmann16/// @date Sept 200217///18// A class that generates enumerated and prefixed string-ids19/****************************************************************************/20#pragma once21#include <config.h>22#include <string>23#include <vector>242526// ===========================================================================27// class definitions28// ===========================================================================29/**30* @class IDSupplier31* This class builds string ids by adding an increasing numerical value to a32* previously given string33*/34class IDSupplier {35public:36/// Constructor37IDSupplier(const std::string& prefix = "", long long int begin = 0);3839/** @brief Constructor40* @param[in] prefix The string to use as ID prefix41* @param[in] knownIDs List of IDs that should never be returned by this42* IDSupplier43**/44IDSupplier(const std::string& prefix, const std::vector<std::string>& knownIDs);4546/// Destructor47~IDSupplier();4849/// Returns the next id50std::string getNext();5152/// make sure that the given id is never supplied53void avoid(const std::string& id);5455private:56/// The current index57long long int myCurrent;5859/// The prefix to use60std::string myPrefix;6162};636465