 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
19 #ifndef NBConnection_h
20 #define NBConnection_h
54 const std::string& toID,
NBEdge* to);
104 std::string
getID()
const;
114 return !(*
this == c);
bool operator==(const NBConnection &c) const
Comparison operator.
const static NBConnection InvalidConnection
int getTLIndex() const
returns the index within the controlling tls or InvalidTLIndex if this link is unontrolled
Storage for edges, including some functionality operating on multiple edges.
void shiftLaneIndex(NBEdge *edge, int offset, int threshold=-1)
patches lane indices refering to the given edge and above the threshold by the given offset
bool operator!=(const NBConnection &c) const
Comparison operator.
NBEdge * getFrom() const
returns the from-edge (start of the connection)
const static int InvalidTlIndex
NBEdge * getTo() const
returns the to-edge (end of the connection)
NBEdge * checkTo(const NBEdgeCont &ec)
Checks whether the to-edge is still valid.
The representation of a single edge during network building.
std::string myFromID
The names of both edges, needed for verification of validity.
NBEdge * myFrom
The from- and the to-edges.
std::string getID() const
returns the id of the connection (!!! not really pretty)
void setTLIndex(int tlIndex)
virtual ~NBConnection()
Destructor.
int getToLane() const
returns the to-lane
friend std::ostream & operator<<(std::ostream &os, const NBConnection &c)
Output operator.
friend bool operator<(const NBConnection &c1, const NBConnection &c2)
Compares both connections in order to allow sorting.
int myFromLane
The lanes; may be -1 if no certain lane was specified.
bool replaceFrom(NBEdge *which, NBEdge *by)
replaces the from-edge by the one given
NBConnection(NBEdge *from, NBEdge *to)
Constructor.
NBEdge * checkFrom(const NBEdgeCont &ec)
Checks whether the from-edge is still valid.
bool check(const NBEdgeCont &ec)
checks whether the edges are still valid
bool replaceTo(NBEdge *which, NBEdge *by)
replaces the to-edge by the one given
Represents a single node (junction) during network building.
int getFromLane() const
returns the from-lane