1 /****************************************************************************/ 2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo 3 // Copyright (C) 2002-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 MSLinkCont.h 11 /// @author Daniel Krajzewicz 12 /// @author Jakob Erdmann 13 /// @date Sept 2002 14 /// @version $Id$ 15 /// 16 // A vector of links 17 /****************************************************************************/ 18 #ifndef MSLinkCont_h 19 #define MSLinkCont_h 20 21 22 // =========================================================================== 23 // included modules 24 // =========================================================================== 25 #include <config.h> 26 27 #include <vector> 28 #include "MSLink.h" 29 30 31 // =========================================================================== 32 // class declarations 33 // =========================================================================== 34 class MSEdge; 35 class MSLane; 36 37 38 // =========================================================================== 39 // class definitions 40 // =========================================================================== 41 /** 42 * @class MSLinkCont 43 * A simple contanier of definitions about how a lane may be left 44 */ 45 typedef std::vector<MSLink*> MSLinkCont; 46 47 48 /** 49 * @class MSLinkContHelper 50 * Some helping functions for dealing with links. 51 */ 52 class MSLinkContHelper { 53 public: 54 /** @brief Returns the internal lane that must be passed in order to get to the desired edge 55 Returns 0 if no such edge exists */ 56 static const MSEdge* getInternalFollowingEdge(const MSLane* fromLane, 57 const MSEdge* followerAfterInternal); 58 59 static const MSLane* getInternalFollowingLane(const MSLane* fromLane, 60 const MSLane* followerAfterInternal); 61 62 /** @brief Returns the link connecting both lanes 63 Both lanes have to be non-internal; 0 may be returned if no connection 64 exists */ 65 static MSLink* getConnectingLink(const MSLane& from, const MSLane& to); 66 }; 67 68 69 #endif 70 71 /****************************************************************************/ 72 73