#include <NBDistribution.h>
Definition at line 44 of file NBDistribution.h.
Static Public Member Functions | |
| static void | clear () |
| static Distribution * | dictionary (const std::string &type, const std::string &id) |
| static bool | dictionary (const std::string &type, const std::string &id, Distribution *d) |
Private Types | |
| typedef std::map< std::string, Distribution * > | DistDict |
| typedef std::map< std::string, DistDict > | TypedDistDict |
Static Private Attributes | |
| static TypedDistDict | myDict |
typedef std::map<std::string, Distribution*> NBDistribution::DistDict [private] |
Definition at line 52 of file NBDistribution.h.
typedef std::map<std::string, DistDict> NBDistribution::TypedDistDict [private] |
Definition at line 53 of file NBDistribution.h.
| void NBDistribution::clear | ( | ) | [static] |
Definition at line 80 of file NBDistribution.cpp.
References myDict.
Referenced by main().
00080 { 00081 for (TypedDistDict::iterator i=myDict.begin(); i!=myDict.end(); i++) { 00082 DistDict &dict = (*i).second; 00083 for (DistDict::iterator j=dict.begin(); j!=dict.end(); j++) { 00084 delete(*j).second; 00085 } 00086 } 00087 }
| Distribution * NBDistribution::dictionary | ( | const std::string & | type, | |
| const std::string & | id | |||
| ) | [static] |
Definition at line 64 of file NBDistribution.cpp.
References myDict.
00065 { 00066 TypedDistDict::iterator i=myDict.find(type); 00067 if (i==myDict.end()) { 00068 return 0; 00069 } 00070 DistDict &dict = (*i).second; 00071 DistDict::iterator j=dict.find(id); 00072 if (j==dict.end()) { 00073 return 0; 00074 } 00075 return (*j).second; 00076 }
| bool NBDistribution::dictionary | ( | const std::string & | type, | |
| const std::string & | id, | |||
| Distribution * | d | |||
| ) | [static] |
Definition at line 45 of file NBDistribution.cpp.
References myDict.
Referenced by NIVissimEdge::getRealSpeed(), NIVissimDistrictConnection::getRealSpeed(), NIVissimSingleTypeParser_Zeitenverteilungsdefinition::parse(), NIVissimSingleTypeParser_Laengenverteilungsdefinition::parse(), and NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition::parse().
00046 { 00047 TypedDistDict::iterator i=myDict.find(type); 00048 00049 if (i==myDict.end()) { 00050 myDict[type][id] = d; 00051 return true; 00052 } 00053 DistDict &dict = (*i).second; 00054 DistDict::iterator j=dict.find(id); 00055 if (j==dict.end()) { 00056 myDict[type][id] = d; 00057 return true; 00058 } 00059 return false; 00060 }
NBDistribution::TypedDistDict NBDistribution::myDict [static, private] |
1.5.6