NIImporter_OpenStreetMap::SimilarEdge Class Reference

Inheritance diagram for NIImporter_OpenStreetMap::SimilarEdge:

unary_function

Detailed Description

Functor which compares two Edges according to all values but id.

Definition at line 141 of file NIImporter_OpenStreetMap.cpp.


Public Member Functions

bool operator() (const std::pair< std::string, Edge * > &p1) const
 Compares the Edge (p1.second) with the node given in the constructor for equality.
 SimilarEdge (const std::pair< std::string, Edge * > &p0)
 Initializes the functor with the fixed comparison partner.

Private Attributes

std::pair< std::string, Edge * > myP0

Constructor & Destructor Documentation

NIImporter_OpenStreetMap::SimilarEdge::SimilarEdge ( const std::pair< std::string, Edge * > &  p0  )  [inline]

Initializes the functor with the fixed comparison partner.

Parameters:
[in] p0 A pair with the Edge all other nodes should be compared with.

Definition at line 148 of file NIImporter_OpenStreetMap.cpp.

00148                                                      :
00149             myP0(p0) {
00150     }


Member Function Documentation

bool NIImporter_OpenStreetMap::SimilarEdge::operator() ( const std::pair< std::string, Edge * > &  p1  )  const [inline]

Compares the Edge (p1.second) with the node given in the constructor for equality.

All values but the ids are compared

Parameters:
[in] p1 A pair with the edge to compare.
Returns:
true if both edges are "similar"; otherwise false.

Definition at line 159 of file NIImporter_OpenStreetMap.cpp.

References myP0.

00159                                                                {
00160         return
00161             myP0.second->myNoLanes==p1.second->myNoLanes &&
00162             myP0.second->myMaxSpeed==p1.second->myMaxSpeed &&
00163             myP0.second->myHighWayType==p1.second->myHighWayType &&
00164             myP0.second->myIsOneWay==p1.second->myIsOneWay &&
00165             myP0.second->myCurrentNodes==p1.second->myCurrentNodes &&
00166             myP0.second->myCurrentIsRoad==p1.second->myCurrentIsRoad;
00167     }


Field Documentation

std::pair<std::string, Edge*> NIImporter_OpenStreetMap::SimilarEdge::myP0 [private]

Definition at line 170 of file NIImporter_OpenStreetMap.cpp.

Referenced by operator()().


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

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