/****************************************************************************/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 PCTypeDefHandler.h14/// @author Daniel Krajzewicz15/// @author Jakob Erdmann16/// @author Michael Behrisch17/// @date Thu, 16.03.200618///19// A handler for loading polygon type maps20/****************************************************************************/21#pragma once22#include <config.h>2324#include <string>25#include <utils/xml/SUMOSAXHandler.h>26#include <utils/options/OptionsCont.h>27#include "PCTypeDefHandler.h"282930// ===========================================================================31// class declarations32// ===========================================================================33class PCTypeToDef;343536// ===========================================================================37// class definitions38// ===========================================================================39/**40* @class PCTypeDefHandler41* @brief A handler for loading polygon type maps42*/43class PCTypeDefHandler : public SUMOSAXHandler {44public:45/** @brief Constructor46* @param[in] oc The options used while loading the type map47* @param[out] con The container to fill48*/49PCTypeDefHandler(OptionsCont& oc, PCTypeMap& con);505152/// @brief Destructor53virtual ~PCTypeDefHandler();545556protected:57/// @name inherited from GenericSAXHandler58//@{5960/** @brief Called on the opening of a tag;61*62* @param[in] element ID of the currently opened element63* @param[in] attrs Attributes within the currently opened element64* @exception ProcessError If something fails65* @see GenericSAXHandler::myStartElement66* @todo Completely unsecure currently (invalid values may force abortion with no error message)67*/68void myStartElement(int element,69const SUMOSAXAttributes& attrs);70//@}717273protected:74/// @brief The options (program settings)75OptionsCont& myOptions;7677/// @brief The type map to fill78PCTypeMap& myContainer;7980/// @brief whether to replace the loaded type with a custom value81bool myOverwriteType;828384private:85/// @brief Invalidated copy constructor86PCTypeDefHandler(const PCTypeDefHandler& src);8788/// @brief Invalidated assignment operator89PCTypeDefHandler& operator=(const PCTypeDefHandler& src);9091};929394