/****************************************************************************/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 ROMARouteHandler.h14/// @author Daniel Krajzewicz15/// @author Jakob Erdmann16/// @author Michael Behrisch17/// @date Mon, 9 Jul 200118///19// Parser and container for routes during their loading20/****************************************************************************/21#pragma once22#include <config.h>2324#include <utils/xml/SUMOSAXHandler.h>252627// ===========================================================================28// class declarations29// ===========================================================================30class ODMatrix;313233// ===========================================================================34// class definitions35// ===========================================================================36/**37* @class ROMARouteHandler38* @brief Parser and container for routes during their loading39*40* ROMARouteHandler transforms vehicles, trips and flows into contributions41* to an ODMatrix.42*/43class ROMARouteHandler : public SUMOSAXHandler {44public:45/// standard constructor46ROMARouteHandler(ODMatrix& matrix);4748/// standard destructor49virtual ~ROMARouteHandler();5051protected:52/// @name inherited from GenericSAXHandler53//@{5455/** @brief Called on the opening of a tag;56*57* @param[in] element ID of the currently opened element58* @param[in] attrs Attributes within the currently opened element59* @exception ProcessError If something fails60* @see GenericSAXHandler::myStartElement61*/62void myStartElement(int element, const SUMOSAXAttributes& attrs);6364void myEndElement(int element);65//@}6667private:68/// @brief The matrix to fill69ODMatrix& myMatrix;7071/// @brief The keys for reading taz72std::vector<std::string> myTazParamKeys;73/// @brief The current vehicle parameters74SUMOVehicleParameter* myVehicleParameter;7576/// @brief whether to ignore attributes fromTaz, toTaz77const bool myIgnoreTaz;7879/// @brief scale for loading vehicles80double myScale;8182/// @brief number of parsed vehicles83int myNumLoaded;8485private:86/// @brief Invalidated copy constructor87ROMARouteHandler(const ROMARouteHandler& s);8889/// @brief Invalidated assignment operator90ROMARouteHandler& operator=(const ROMARouteHandler& s);9192};939495