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