51 const std::string& toID,
NBEdge* to);
107 std::string
getID()
const;
117 return !(*
this == c);
NBEdge * getFrom() const
returns the from-edge (start of the connection)
std::string getID() const
returns the id of the connection (!!! not really pretty)
int getFromLane() const
returns the from-lane
bool replaceTo(NBEdge *which, NBEdge *by)
replaces the to-edge by the one given
NBEdge * myFrom
The from- and the to-edges.
friend bool operator<(const NBConnection &c1, const NBConnection &c2)
Compares both connections in order to allow sorting.
int myTlIndex2
The index of the internal junction within the controlling traffic light (optional)
int myFromLane
The lanes; may be -1 if no certain lane was specified.
int getTLIndex() const
returns the index within the controlling tls or InvalidTLIndex if this link is unontrolled
static const int InvalidTlIndex
bool operator==(const NBConnection &c) const
Comparison operator.
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 replaceFrom(NBEdge *which, NBEdge *by)
replaces the from-edge by the one given
NBEdge * checkFrom(const NBEdgeCont &ec)
Checks whether the from-edge is still valid.
void setTLIndex(int tlIndex)
bool operator!=(const NBConnection &c) const
Comparison operator.
int getToLane() const
returns the to-lane
friend std::ostream & operator<<(std::ostream &os, const NBConnection &c)
Output operator.
void setTLIndex2(int tlIndex)
NBEdge * getTo() const
returns the to-edge (end of the connection)
virtual ~NBConnection()
Destructor.
bool check(const NBEdgeCont &ec)
checks whether the edges are still valid
std::string myFromID
The names of both edges, needed for verification of validity.
NBEdge * checkTo(const NBEdgeCont &ec)
Checks whether the to-edge is still valid.
static const NBConnection InvalidConnection
Storage for edges, including some functionality operating on multiple edges.
The representation of a single edge during network building.
Represents a single node (junction) during network building.