LCOV - code coverage report
Current view: top level - src/guinetload - GUIEdgeControlBuilder.cpp (source / functions) Hit Total Coverage
Test: lcov.info Lines: 10 10 100.0 %
Date: 2024-05-05 15:31:14 Functions: 5 5 100.0 %

          Line data    Source code
       1             : /****************************************************************************/
       2             : // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
       3             : // Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
       4             : // This program and the accompanying materials are made available under the
       5             : // terms of the Eclipse Public License 2.0 which is available at
       6             : // https://www.eclipse.org/legal/epl-2.0/
       7             : // This Source Code may also be made available under the following Secondary
       8             : // Licenses when the conditions for such availability set forth in the Eclipse
       9             : // Public License 2.0 are satisfied: GNU General Public License, version 2
      10             : // or later which is available at
      11             : // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
      12             : // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
      13             : /****************************************************************************/
      14             : /// @file    GUIEdgeControlBuilder.cpp
      15             : /// @author  Daniel Krajzewicz
      16             : /// @author  Jakob Erdmann
      17             : /// @author  Michael Behrisch
      18             : /// @date    Sept 2002
      19             : ///
      20             : // Derivation of NLEdgeControlBuilder which build gui-edges
      21             : /****************************************************************************/
      22             : #include <config.h>
      23             : 
      24             : #include <vector>
      25             : #include <string>
      26             : #include <map>
      27             : #include <algorithm>
      28             : #include <guisim/GUIEdge.h>
      29             : #include <guisim/GUINet.h>
      30             : #include <guisim/GUILane.h>
      31             : #include <microsim/MSJunction.h>
      32             : #include <netload/NLBuilder.h>
      33             : #include "GUIEdgeControlBuilder.h"
      34             : #include <gui/GUIGlobals.h>
      35             : 
      36             : 
      37             : // ===========================================================================
      38             : // method definitions
      39             : // ===========================================================================
      40        7228 : GUIEdgeControlBuilder::GUIEdgeControlBuilder()
      41        7228 :     : NLEdgeControlBuilder() {}
      42             : 
      43             : 
      44       14456 : GUIEdgeControlBuilder::~GUIEdgeControlBuilder() {}
      45             : 
      46             : 
      47             : MSLane*
      48      333689 : GUIEdgeControlBuilder::addLane(const std::string& id,
      49             :                                double maxSpeed, double friction, double length,
      50             :                                const PositionVector& shape,
      51             :                                double width,
      52             :                                SVCPermissions permissions,
      53             :                                SVCPermissions changeLeft, SVCPermissions changeRight,
      54             :                                int index, bool isRampAccel,
      55             :                                const std::string& type,
      56             :                                const PositionVector& outlineShape) {
      57      333689 :     MSLane* lane = new GUILane(id, maxSpeed, friction, length, myActiveEdge, myCurrentNumericalLaneID++, shape, width, permissions, changeLeft, changeRight, index, isRampAccel, type, outlineShape);
      58      333689 :     myLaneStorage->push_back(lane);
      59      333689 :     myCurrentLaneIndex = index;
      60      333689 :     return lane;
      61             : }
      62             : 
      63             : 
      64             : 
      65             : MSEdge*
      66      288166 : GUIEdgeControlBuilder::buildEdge(const std::string& id, const SumoXMLEdgeFunc function,
      67             :                                  const std::string& streetName, const std::string& edgeType, const int priority, const double distance) {
      68      288166 :     return new GUIEdge(id, myCurrentNumericalEdgeID++, function, streetName, edgeType, priority, distance);
      69             : }
      70             : 
      71             : 
      72             : /****************************************************************************/

Generated by: LCOV version 1.14