LCOV - code coverage report
Current view: top level - src/microsim - MSJunctionLogic.h (source / functions) Coverage Total Hit
Test: lcov.info Lines: 11.1 % 9 1
Test Date: 2024-11-22 15:46:21 Functions: 0.0 % 4 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    MSJunctionLogic.h
      15              : /// @author  Christian Roessel
      16              : /// @author  Daniel Krajzewicz
      17              : /// @author  Sascha Krieg
      18              : /// @date    Wed, 12 Dez 2001
      19              : ///
      20              : // kinds of logic-implementations.
      21              : /****************************************************************************/
      22              : #pragma once
      23              : #include <config.h>
      24              : 
      25              : #include <string>
      26              : #include <utils/common/StdDefs.h>
      27              : #include "MSLogicJunction.h"
      28              : 
      29              : 
      30              : // ===========================================================================
      31              : // class definitions
      32              : // ===========================================================================
      33              : /**
      34              :  * @class MSJunctionLogic
      35              :  */
      36              : class MSJunctionLogic {
      37              : public:
      38              :     /// Destructor.
      39              :     virtual ~MSJunctionLogic();
      40              : 
      41              :     /// @brief Returns the response for the given link
      42            0 :     virtual const MSLogicJunction::LinkBits& getResponseFor(int linkIndex) const {
      43              :         UNUSED_PARAMETER(linkIndex);
      44            0 :         return myDummyFoes;
      45              :     }
      46              : 
      47              :     /// @brief Returns the foes for the given link
      48            0 :     virtual const MSLogicJunction::LinkBits& getFoesFor(int linkIndex) const {
      49              :         UNUSED_PARAMETER(linkIndex);
      50            0 :         return myDummyFoes;
      51              :     }
      52              : 
      53            0 :     virtual bool getIsCont(int linkIndex) const {
      54              :         UNUSED_PARAMETER(linkIndex);
      55            0 :         return false;
      56              :     }
      57              : 
      58              :     int getLogicSize() const {
      59      1646058 :         return myNLinks;
      60              :     }
      61              : 
      62            0 :     virtual bool hasFoes() const {
      63            0 :         return false;
      64              :     }
      65              : 
      66              : protected:
      67              :     /// Constructor.
      68              :     MSJunctionLogic(int nLinks);
      69              : 
      70              :     /// The logic's number of links.
      71              :     int myNLinks;
      72              : 
      73              :     /// @brief A dummy foe container
      74              :     static MSLogicJunction::LinkBits myDummyFoes;
      75              : 
      76              : private:
      77              :     /// Copy constructor.
      78              :     MSJunctionLogic(const MSJunctionLogic&) = delete;
      79              : 
      80              :     /// Assignment operator.
      81              :     MSJunctionLogic& operator=(const MSJunctionLogic&) = delete;
      82              : 
      83              : };
        

Generated by: LCOV version 2.0-1