1 /****************************************************************************/ 2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo 3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. 4 // This program and the accompanying materials 5 // are made available under the terms of the Eclipse Public License v2.0 6 // which accompanies this distribution, and is available at 7 // http://www.eclipse.org/legal/epl-v20.html 8 // SPDX-License-Identifier: EPL-2.0 9 /****************************************************************************/ 10 /// @file MSJunctionLogic.h 11 /// @author Christian Roessel 12 /// @author Daniel Krajzewicz 13 /// @author Sascha Krieg 14 /// @date Wed, 12 Dez 2001 15 /// @version $Id$ 16 /// 17 // kinds of logic-implementations. 18 /****************************************************************************/ 19 #ifndef MSJunctionLogic_h 20 #define MSJunctionLogic_h 21 22 23 // =========================================================================== 24 // included modules 25 // =========================================================================== 26 #include <config.h> 27 28 #include <utils/common/StdDefs.h> 29 #include "MSLogicJunction.h" 30 #include <string> 31 32 33 // =========================================================================== 34 // class definitions 35 // =========================================================================== 36 /** 37 * @class MSJunctionLogic 38 */ 39 class MSJunctionLogic { 40 public: 41 /// Destructor. 42 virtual ~MSJunctionLogic(); 43 44 /// Returns the logic's number of links. 45 int nLinks(); 46 47 /// @brief Returns the response for the given link getResponseFor(int linkIndex)48 virtual const MSLogicJunction::LinkBits& getResponseFor(int linkIndex) const { 49 UNUSED_PARAMETER(linkIndex); 50 return myDummyFoes; 51 } 52 53 /// @brief Returns the foes for the given link getFoesFor(int linkIndex)54 virtual const MSLogicJunction::LinkBits& getFoesFor(int linkIndex) const { 55 UNUSED_PARAMETER(linkIndex); 56 return myDummyFoes; 57 } getIsCont(int linkIndex)58 virtual bool getIsCont(int linkIndex) const { 59 UNUSED_PARAMETER(linkIndex); 60 return false; 61 } 62 63 getLogicSize()64 int getLogicSize() const { 65 return myNLinks; 66 } 67 hasFoes()68 virtual bool hasFoes() const { 69 return false; 70 } 71 72 73 74 75 protected: 76 /// Constructor. 77 MSJunctionLogic(int nLinks); 78 79 /// The logic's number of links. 80 int myNLinks; 81 82 /// @brief A dummy foe container 83 static MSLogicJunction::LinkBits myDummyFoes; 84 85 private: 86 /// Default constructor. 87 MSJunctionLogic(); 88 89 /// Copy constructor. 90 MSJunctionLogic(const MSJunctionLogic&); 91 92 /// Assignment operator. 93 MSJunctionLogic& operator=(const MSJunctionLogic&); 94 95 }; 96 97 98 #endif 99 100 /****************************************************************************/ 101 102