#include <NIVissimEdgePosMap.h>
Definition at line 41 of file NIVissimEdgePosMap.h.
Public Member Functions | |
| void | add (int edgeid, SUMOReal from, SUMOReal to) |
| void | add (int edgeid, SUMOReal pos) |
| void | join (NIVissimEdgePosMap &with) |
| NIVissimEdgePosMap () | |
| ~NIVissimEdgePosMap () | |
Private Types | |
| typedef std::map< int, Range > | ContType |
| typedef std::pair< SUMOReal, SUMOReal > | Range |
Private Attributes | |
| ContType | myCont |
typedef std::map<int, Range> NIVissimEdgePosMap::ContType [private] |
Definition at line 50 of file NIVissimEdgePosMap.h.
typedef std::pair<SUMOReal, SUMOReal> NIVissimEdgePosMap::Range [private] |
Definition at line 49 of file NIVissimEdgePosMap.h.
| NIVissimEdgePosMap::NIVissimEdgePosMap | ( | ) |
| NIVissimEdgePosMap::~NIVissimEdgePosMap | ( | ) |
| void NIVissimEdgePosMap::add | ( | int | edgeid, | |
| SUMOReal | from, | |||
| SUMOReal | to | |||
| ) |
Definition at line 52 of file NIVissimEdgePosMap.cpp.
References myCont, and SUMOReal.
00052 { 00053 if (from>to) { 00054 SUMOReal tmp = from; 00055 from = to; 00056 to = tmp; 00057 } 00058 ContType::iterator i=myCont.find(edgeid); 00059 if (i==myCont.end()) { 00060 myCont[edgeid] = Range(from, to); 00061 } else { 00062 SUMOReal pfrom = (*i).second.first; 00063 SUMOReal pto = (*i).second.second; 00064 if (pfrom<from) { 00065 from = pfrom; 00066 } 00067 if (pto>to) { 00068 to = pto; 00069 } 00070 myCont[edgeid] = Range(from, to); 00071 } 00072 }
| void NIVissimEdgePosMap::add | ( | int | edgeid, | |
| SUMOReal | pos | |||
| ) |
| void NIVissimEdgePosMap::join | ( | NIVissimEdgePosMap & | with | ) |
Definition at line 76 of file NIVissimEdgePosMap.cpp.
References myCont.
00076 { 00077 for (ContType::iterator i=with.myCont.begin(); i!=with.myCont.end(); i++) { 00078 add((*i).first, (*i).second.first, (*i).second.second); 00079 } 00080 }
ContType NIVissimEdgePosMap::myCont [private] |
1.5.6