NIVissimEdgePosMap Class Reference

#include <NIVissimEdgePosMap.h>


Detailed Description

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, RangeContType
typedef std::pair< SUMOReal,
SUMOReal > 
Range

Private Attributes

ContType myCont

Member Typedef Documentation

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.


Constructor & Destructor Documentation

NIVissimEdgePosMap::NIVissimEdgePosMap (  ) 

Definition at line 39 of file NIVissimEdgePosMap.cpp.

00039 {}

NIVissimEdgePosMap::~NIVissimEdgePosMap (  ) 

Definition at line 42 of file NIVissimEdgePosMap.cpp.

00042 {}


Member Function Documentation

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 
)

Definition at line 46 of file NIVissimEdgePosMap.cpp.

00046                                                 {
00047     add(edgeid, pos, pos);
00048 }

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 }


Field Documentation

Definition at line 51 of file NIVissimEdgePosMap.h.

Referenced by add(), and join().


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