/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2026 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 GeneralHandler.h14/// @author Pablo Alvarez Lopez15/// @date Sep 202116///17// General element handler18/****************************************************************************/19#pragma once20#include <config.h>2122#include <utils/xml/SUMOSAXHandler.h>2324// ===========================================================================25// class declaration26// ===========================================================================2728class FileBucket;2930// ===========================================================================31// class definitions32// ===========================================================================3334class GeneralHandler : public SUMOSAXHandler {3536public:37/**@brief Constructor38* @param[in] bucket FileBucket in which place the element39*/40GeneralHandler(FileBucket* fileBucket);4142/// @brief Destructor43~GeneralHandler();4445/// @brief parse46bool parse();4748private:49/// @brief start element50virtual void beginTag(SumoXMLTag tag, const SUMOSAXAttributes& attrs) = 0;5152/// @brief end element53virtual void endTag() = 0;5455/// @name inherited from SUMOSAXHandler56/// @{57/** @brief Called on the opening of a tag;58*59* @param[in] element ID of the currently opened element60* @param[in] attrs Attributes within the currently opened element61* @exception ProcessError If something fails62* @see GenericSAXHandler::myStartElement63* @todo Refactor/describe64*/65void myStartElement(int element, const SUMOSAXAttributes& attrs);6667/** @brief Called when a closing tag occurs68*69* @param[in] element ID of the currently opened element70* @exception ProcessError If something fails71* @see GenericSAXHandler::myEndElement72* @todo Refactor/describe73*/74void myEndElement(int element);7576/// @}7778/// @brief invalidate default onstructor79GeneralHandler() = delete;8081/// @brief invalidate copy constructor82GeneralHandler(const GeneralHandler& s) = delete;8384/// @brief invalidate assignment operator85GeneralHandler& operator=(const GeneralHandler& s) = delete;86};8788/****************************************************************************/899091