NIVissimVehicleType Class Reference

#include <NIVissimVehicleType.h>


Detailed Description

Definition at line 43 of file NIVissimVehicleType.h.


Public Member Functions

 NIVissimVehicleType (int id, const std::string &name, const std::string &category, SUMOReal length, const RGBColor &color, SUMOReal amax, SUMOReal dmax)
 ~NIVissimVehicleType ()

Static Public Member Functions

static void clearDict ()
static NIVissimVehicleTypedictionary (int id)
static bool dictionary (int id, NIVissimVehicleType *o)
static bool dictionary (int id, const std::string &name, const std::string &category, SUMOReal length, const RGBColor &color, SUMOReal amax, SUMOReal dmax)

Private Types

typedef std::map< int,
NIVissimVehicleType * > 
DictType

Private Attributes

SUMOReal myAMax
std::string myCategory
RGBColor myColor
SUMOReal myDMax
int myID
SUMOReal myLength
std::string myName

Static Private Attributes

static DictType myDict

Member Typedef Documentation

typedef std::map<int, NIVissimVehicleType *> NIVissimVehicleType::DictType [private]

Definition at line 64 of file NIVissimVehicleType.h.


Constructor & Destructor Documentation

NIVissimVehicleType::NIVissimVehicleType ( int  id,
const std::string &  name,
const std::string &  category,
SUMOReal  length,
const RGBColor color,
SUMOReal  amax,
SUMOReal  dmax 
)

Definition at line 39 of file NIVissimVehicleType.cpp.

Referenced by dictionary().

00042         : myID(id), myName(name), myCategory(category), myLength(length),
00043         myColor(color), myAMax(amax), myDMax(dmax) {}

NIVissimVehicleType::~NIVissimVehicleType (  ) 

Definition at line 46 of file NIVissimVehicleType.cpp.

00046 {}


Member Function Documentation

void NIVissimVehicleType::clearDict (  )  [static]

Definition at line 85 of file NIVissimVehicleType.cpp.

References myDict.

Referenced by NIImporter_Vissim::~NIImporter_Vissim().

00085                                {
00086     for (DictType::iterator i=myDict.begin(); i!=myDict.end(); i++) {
00087         delete(*i).second;
00088     }
00089     myDict.clear();
00090 }

NIVissimVehicleType * NIVissimVehicleType::dictionary ( int  id  )  [static]

Definition at line 76 of file NIVissimVehicleType.cpp.

References myDict.

00076                                       {
00077     DictType::iterator i=myDict.find(id);
00078     if (i==myDict.end()) {
00079         return 0;
00080     }
00081     return (*i).second;
00082 }

bool NIVissimVehicleType::dictionary ( int  id,
NIVissimVehicleType o 
) [static]

Definition at line 65 of file NIVissimVehicleType.cpp.

References myDict.

00065                                                               {
00066     DictType::iterator i=myDict.find(id);
00067     if (i==myDict.end()) {
00068         myDict[id] = o;
00069         return true;
00070     }
00071     return false;
00072 }

bool NIVissimVehicleType::dictionary ( int  id,
const std::string &  name,
const std::string &  category,
SUMOReal  length,
const RGBColor color,
SUMOReal  amax,
SUMOReal  dmax 
) [static]

Definition at line 51 of file NIVissimVehicleType.cpp.

References NIVissimVehicleType().

Referenced by NIVissimSingleTypeParser_Fahrzeugtypdefinition::parse().

00053                                                                                      {
00054     NIVissimVehicleType *o = new NIVissimVehicleType(id, name, category,
00055             length, color, amax, dmax);
00056     if (!dictionary(id, o)) {
00057         delete o;
00058         return false;
00059     }
00060     return true;
00061 }


Field Documentation

SUMOReal NIVissimVehicleType::myAMax [private]

Definition at line 62 of file NIVissimVehicleType.h.

std::string NIVissimVehicleType::myCategory [private]

Definition at line 59 of file NIVissimVehicleType.h.

Definition at line 61 of file NIVissimVehicleType.h.

Definition at line 65 of file NIVissimVehicleType.h.

Referenced by clearDict(), and dictionary().

SUMOReal NIVissimVehicleType::myDMax [private]

Definition at line 62 of file NIVissimVehicleType.h.

Definition at line 57 of file NIVissimVehicleType.h.

SUMOReal NIVissimVehicleType::myLength [private]

Definition at line 60 of file NIVissimVehicleType.h.

std::string NIVissimVehicleType::myName [private]

Definition at line 58 of file NIVissimVehicleType.h.


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

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