LCOV - code coverage report
Current view: top level - src/microsim - MSJunction.cpp (source / functions) Coverage Total Hit
Test: lcov.info Lines: 64.3 % 14 9
Test Date: 2024-10-24 15:46:30 Functions: 50.0 % 6 3

            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    MSJunction.cpp
      15              : /// @author  Christian Roessel
      16              : /// @author  Daniel Krajzewicz
      17              : /// @author  Michael Behrisch
      18              : /// @date    Wed, 12 Dez 2001
      19              : ///
      20              : // The base class for an intersection
      21              : /****************************************************************************/
      22              : #include <config.h>
      23              : 
      24              : #include "MSVehicle.h"
      25              : #include "MSEdge.h"
      26              : #include "MSJunction.h"
      27              : 
      28              : 
      29              : 
      30              : 
      31              : 
      32              : 
      33              : // ===========================================================================
      34              : // debug constants
      35              : // ===========================================================================
      36              : //#define DEBUG_LINKLEADER
      37              : //#define DEBUG_COND (ego->isSelected())
      38              : //#define DEBUG_COND (true)
      39              : 
      40              : 
      41              : 
      42              : // ===========================================================================
      43              : // class declarations
      44              : // ===========================================================================
      45              : class MSLink;
      46              : 
      47              : // ===========================================================================
      48              : // static member definitions
      49              : // ===========================================================================
      50              : 
      51              : // ===========================================================================
      52              : // member method definition
      53              : // ===========================================================================
      54       527764 : MSJunction::MSJunction(const std::string& id, SumoXMLNodeType type, const Position& position,
      55       527764 :                        const PositionVector& shape, const std::string& name) :
      56              :     Named(id),
      57       527764 :     myType(type),
      58       527764 :     myPosition(position),
      59              :     myShape(shape),
      60       527764 :     myName(name) {
      61       527764 : }
      62              : 
      63              : 
      64       490241 : MSJunction::~MSJunction() {}
      65              : 
      66              : 
      67              : const Position&
      68     11672242 : MSJunction::getPosition(bool secondaryShape) const {
      69     11672242 :     return secondaryShape ? myPosition2 : myPosition;
      70              : }
      71              : 
      72              : 
      73              : void
      74            0 : MSJunction::postloadInit() {}
      75              : 
      76              : 
      77              : int
      78            0 : MSJunction::getNrOfIncomingLanes() const {
      79              :     int nr = 0;
      80            0 :     for (const MSEdge* e : myIncoming) {
      81            0 :         nr += (int)e->getLanes().size();
      82              :     }
      83            0 :     return nr;
      84              : }
      85              : 
      86              : 
      87              : /****************************************************************************/
        

Generated by: LCOV version 2.0-1