NIVissimVehTypeClass Class Reference

#include <NIVissimVehTypeClass.h>


Detailed Description

Definition at line 44 of file NIVissimVehTypeClass.h.


Public Member Functions

SUMOReal meanSpeed () const
 NIVissimVehTypeClass (int id, const std::string &name, const RGBColor &color, IntVector &types)
 ~NIVissimVehTypeClass ()

Static Public Member Functions

static void clearDict ()
static NIVissimVehTypeClassdictionary (int name)
static bool dictionary (int id, NIVissimVehTypeClass *o)
static bool dictionary (int id, const std::string &name, const RGBColor &color, IntVector &types)

Private Types

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

Private Attributes

RGBColor myColor
int myID
std::string myName
IntVector myTypes

Static Private Attributes

static DictType myDict

Member Typedef Documentation

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

Definition at line 61 of file NIVissimVehTypeClass.h.


Constructor & Destructor Documentation

NIVissimVehTypeClass::NIVissimVehTypeClass ( int  id,
const std::string &  name,
const RGBColor color,
IntVector types 
)

Definition at line 42 of file NIVissimVehTypeClass.cpp.

Referenced by dictionary().

00046         : myID(id), myName(name), myColor(color), myTypes(types) {}

NIVissimVehTypeClass::~NIVissimVehTypeClass (  ) 

Definition at line 48 of file NIVissimVehTypeClass.cpp.

00048 {}


Member Function Documentation

void NIVissimVehTypeClass::clearDict (  )  [static]

Definition at line 88 of file NIVissimVehTypeClass.cpp.

References myDict.

Referenced by NIImporter_Vissim::~NIImporter_Vissim().

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

NIVissimVehTypeClass * NIVissimVehTypeClass::dictionary ( int  name  )  [static]

Definition at line 78 of file NIVissimVehTypeClass.cpp.

References myDict.

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

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

Definition at line 67 of file NIVissimVehTypeClass.cpp.

References myDict.

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

bool NIVissimVehTypeClass::dictionary ( int  id,
const std::string &  name,
const RGBColor color,
IntVector types 
) [static]

Definition at line 52 of file NIVissimVehTypeClass.cpp.

References NIVissimVehTypeClass().

Referenced by NIVissimSingleTypeParser_Fahrzeugklassendefinition::parse().

00054                                                    {
00055     NIVissimVehTypeClass *o = new NIVissimVehTypeClass(id, name, color, types);
00056     if (!dictionary(id, o)) {
00057         delete o;
00058         return false;
00059     }
00060     return true;
00061 }

SUMOReal NIVissimVehTypeClass::meanSpeed (  )  const


Field Documentation

Definition at line 58 of file NIVissimVehTypeClass.h.

Definition at line 62 of file NIVissimVehTypeClass.h.

Referenced by clearDict(), and dictionary().

Definition at line 56 of file NIVissimVehTypeClass.h.

std::string NIVissimVehTypeClass::myName [private]

Definition at line 57 of file NIVissimVehTypeClass.h.

Definition at line 59 of file NIVissimVehTypeClass.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