40 #ifdef CHECK_MEMORY_LEAKS
42 #endif // CHECK_MEMORY_LEAKS
55 myFrom(from), myTo(to),
56 myFromID(from->getID()), myToID(to->getID()),
57 myFromLane(-1), myToLane(-1),
58 myTlIndex(InvalidTlIndex) {
63 const std::string& toID,
NBEdge* to) :
64 myFrom(from), myTo(to),
65 myFromID(fromID), myToID(toID),
66 myFromLane(-1), myToLane(-1),
67 myTlIndex(InvalidTlIndex) {
72 NBEdge* to,
int toLane,
int tlIndex) :
73 myFrom(from), myTo(to),
74 myFromLane(fromLane), myToLane(toLane),
89 myFrom(c.myFrom), myTo(c.myTo),
90 myFromID(c.myFromID), myToID(c.myToID),
91 myFromLane(c.myFromLane), myToLane(c.myToLane),
92 myTlIndex(c.myTlIndex) {
230 std::stringstream str;
252 }
else if (
myTo == edge) {
std::string myFromID
The names of both edges, needed for verification of validity.
bool check(const NBEdgeCont &ec)
checks whether the edges are still valid
NBEdge * retrievePossiblySplit(const std::string &id, bool downstream) const
Tries to retrieve an edge, even if it is splitted.
int getTLIndex() const
returns the index within the controlling tls or InvalidTLIndex if this link is unontrolled ...
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
int getFromLane() const
returns the from-lane
static std::string getIDSecure(const T *obj, const std::string &fallBack="NULL")
get an identifier for Named-like object which may be Null
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
int myFromLane
The lanes; may be -1 if no certain lane was specified.
std::string getID() const
returns the id of the connection (!!! not really pretty)
const std::string & getID() const
Returns the id.
bool operator==(const NBConnection &c) const
Comparison operator.
static const int InvalidTlIndex
bool replaceFrom(NBEdge *which, NBEdge *by)
replaces the from-edge by the one given
bool operator<(const NBConnection &c1, const NBConnection &c2)
NBEdge * checkTo(const NBEdgeCont &ec)
Checks whether the to-edge is still valid.
Storage for edges, including some functionality operating on multiple edges.
NBConnection(NBEdge *from, NBEdge *to)
Constructor.
NBEdge * retrieve(const std::string &id, bool retrieveExtracted=false) const
Returns the edge that has the given id.
int getToLane() const
returns the to-lane
NBEdge * getTo() const
returns the to-edge (end of the connection)
std::ostream & operator<<(std::ostream &os, const NBConnection &c)
NBEdge * myFrom
The from- and the to-edges.
NBEdge * checkFrom(const NBEdgeCont &ec)
Checks whether the from-edge is still valid.