SUMO - Simulation of Urban MObility

NIImporter_OpenStreetMap::SubstituteNode Class Reference

A functor to substitute a node in the node list of an Edge. More...

Inheritance diagram for NIImporter_OpenStreetMap::SubstituteNode:
unary_function

Public Member Functions

void operator() (const std::pair< std::string, Edge * > &p) const
 Substitutes the nodes in the edge of the given pair.
 SubstituteNode (const NIOSMNode *const toSubstitute, const NIOSMNode *const substituteWith)
 Initializes the functor with the node to substitute and the node with that the node in the first argument is substituted.

Private Attributes

const NIOSMNode *const *const mySubstituteWith
const NIOSMNode *const myToSubstitute

Detailed Description

A functor to substitute a node in the node list of an Edge.

Definition at line 77 of file NIImporter_OpenStreetMap.cpp.


Constructor & Destructor Documentation

NIImporter_OpenStreetMap::SubstituteNode::SubstituteNode ( const NIOSMNode *const  toSubstitute,
const NIOSMNode *const  substituteWith 
) [inline]

Initializes the functor with the node to substitute and the node with that the node in the first argument is substituted.

Parameters:
[in]toSubstituteEvery occurrence of this node should substituted
[in]substituteWithThis node is overwrites the occurrences of toSubstitute

Definition at line 89 of file NIImporter_OpenStreetMap.cpp.


Member Function Documentation

void NIImporter_OpenStreetMap::SubstituteNode::operator() ( const std::pair< std::string, Edge * > &  p) const [inline]

Substitutes the nodes in the edge of the given pair.

In the node list, all occurrences of toSubstitute are substituted with substituteWith. The final list has no equal adjacent nodes.

Parameters:
[in]pA pair with the edge in which the nodes are substituted

Definition at line 101 of file NIImporter_OpenStreetMap.cpp.

References NIImporter_OpenStreetMap::NIOSMNode::id, mySubstituteWith, and myToSubstitute.


Field Documentation

Definition at line 114 of file NIImporter_OpenStreetMap.cpp.

Referenced by operator()().

Definition at line 114 of file NIImporter_OpenStreetMap.cpp.

Referenced by operator()().


The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines