NIVissimClosures Class Reference

#include <NIVissimClosures.h>


Detailed Description

Definition at line 43 of file NIVissimClosures.h.


Public Member Functions

 NIVissimClosures (const std::string &id, int from_node, int to_node, IntVector &overEdges)
 ~NIVissimClosures ()

Static Public Member Functions

static void clearDict ()
static NIVissimClosuresdictionary (const std::string &name)
static bool dictionary (const std::string &name, NIVissimClosures *o)
static bool dictionary (const std::string &id, int from_node, int to_node, IntVector &overEdges)

Private Types

typedef std::map< std::string,
NIVissimClosures * > 
DictType

Private Attributes

int myFromNode
const std::string myID
IntVector myOverEdges
int myToNode

Static Private Attributes

static DictType myDict

Member Typedef Documentation

typedef std::map<std::string, NIVissimClosures*> NIVissimClosures::DictType [private]

Definition at line 55 of file NIVissimClosures.h.


Constructor & Destructor Documentation

NIVissimClosures::NIVissimClosures ( const std::string &  id,
int  from_node,
int  to_node,
IntVector overEdges 
)

Definition at line 41 of file NIVissimClosures.cpp.

Referenced by dictionary().

00044         : myID(id), myFromNode(from_node), myToNode(to_node),
00045         myOverEdges(overEdges) {}

NIVissimClosures::~NIVissimClosures (  ) 

Definition at line 48 of file NIVissimClosures.cpp.

00048 {}


Member Function Documentation

void NIVissimClosures::clearDict (  )  [static]

Definition at line 88 of file NIVissimClosures.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 }

NIVissimClosures * NIVissimClosures::dictionary ( const std::string &  name  )  [static]

Definition at line 77 of file NIVissimClosures.cpp.

References myDict.

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

bool NIVissimClosures::dictionary ( const std::string &  name,
NIVissimClosures o 
) [static]

Definition at line 66 of file NIVissimClosures.cpp.

References myDict.

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

bool NIVissimClosures::dictionary ( const std::string &  id,
int  from_node,
int  to_node,
IntVector overEdges 
) [static]

Definition at line 52 of file NIVissimClosures.cpp.

References NIVissimClosures().

Referenced by NIVissimSingleTypeParser_Kantensperrung::parse().

00054                                                    {
00055     NIVissimClosures *o = new NIVissimClosures(id, from_node, to_node,
00056             overEdges);
00057     if (!dictionary(id, o)) {
00058         delete o;
00059         return false;
00060     }
00061     return true;
00062 }


Field Documentation

Definition at line 56 of file NIVissimClosures.h.

Referenced by clearDict(), and dictionary().

Definition at line 58 of file NIVissimClosures.h.

const std::string NIVissimClosures::myID [private]

Definition at line 57 of file NIVissimClosures.h.

Definition at line 59 of file NIVissimClosures.h.

Definition at line 58 of file NIVissimClosures.h.


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

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