NIVissimEdge::connection_cluster_position_sorter Class Reference


Detailed Description

Sorts connection clusters the edge participates in by their position along the given edge

Definition at line 242 of file NIVissimEdge.h.


Public Member Functions

 connection_cluster_position_sorter (int edgeid)
 constructor
int operator() (NIVissimConnectionCluster *cc1, NIVissimConnectionCluster *cc2) const
 comparing operation

Private Attributes

int myEdgeID
 The id of the edge.

Constructor & Destructor Documentation

NIVissimEdge::connection_cluster_position_sorter::connection_cluster_position_sorter ( int  edgeid  )  [explicit]

constructor

Definition at line 95 of file NIVissimEdge.cpp.

00096         : myEdgeID(edgeid) {}


Member Function Documentation

int NIVissimEdge::connection_cluster_position_sorter::operator() ( NIVissimConnectionCluster cc1,
NIVissimConnectionCluster cc2 
) const

comparing operation

Definition at line 100 of file NIVissimEdge.cpp.

References NIVissimConnectionCluster::getPositionForEdge(), myEdgeID, and SUMOReal.

00102                                           {
00103     SUMOReal pos1 = cc1->getPositionForEdge(myEdgeID);
00104     SUMOReal pos2 = cc2->getPositionForEdge(myEdgeID);
00105     if (pos2<0||pos1<0) {
00106         cc1->getPositionForEdge(myEdgeID);
00107         cc2->getPositionForEdge(myEdgeID);
00108     }
00109     assert(pos1>=0&&pos2>=0);
00110     return pos1<pos2;
00111 }


Field Documentation

The id of the edge.

Definition at line 253 of file NIVissimEdge.h.

Referenced by operator()().


The documentation for this class was generated from the following files:

Generated on Wed May 5 00:06:54 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6