SUMO - Simulation of Urban MObility
NIVissimDisturbance.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // -------------------
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
11 // Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors
12 /****************************************************************************/
13 //
14 // This file is part of SUMO.
15 // SUMO is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 /****************************************************************************/
21 #ifndef NIVissimDisturbance_h
22 #define NIVissimDisturbance_h
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include <map>
35 #include <string>
37 #include <netbuild/NBConnection.h>
41 
42 
43 // ===========================================================================
44 // class declarations
45 // ===========================================================================
46 class NBNode;
47 class NBEdge;
48 class NBDistrictCont;
49 
52 public:
53  NIVissimDisturbance(int id, const std::string& name,
54  const NIVissimExtendedEdgePoint& edge,
55  const NIVissimExtendedEdgePoint& by);
56  virtual ~NIVissimDisturbance();
57  void computeBounding();
58  bool addToNode(NBNode* node, NBDistrictCont& dc,
59  NBNodeCont& nc, NBEdgeCont& ec);
60  int getEdgeID() const {
61  return myEdge.getEdgeID();
62  }
63  int getDisturbanceID() const {
64  return myDisturbance.getEdgeID();
65  }
66  NBConnection getConnection(NBNode* node, int aedgeid);
67 
68 public:
69  static bool dictionary(const std::string& name,
70  const NIVissimExtendedEdgePoint& edge,
71  const NIVissimExtendedEdgePoint& by);
72  static bool dictionary(int id, NIVissimDisturbance* o);
73  static NIVissimDisturbance* dictionary(int id);
74  static std::vector<int> getWithin(const AbstractPoly& poly);
75  static void clearDict();
76  static void dict_SetDisturbances();
77  static void reportRefused();
78 
79 private:
80  int myID;
81  int myNode;
82  std::string myName;
85 
86  typedef std::map<int, NIVissimDisturbance*> DictType;
87  static DictType myDict;
88  static int myRunningID;
89  static int refusedProhibits;
90 };
91 
92 
93 #endif
94 
95 /****************************************************************************/
96 
static DictType myDict
int getDisturbanceID() const
static std::vector< int > getWithin(const AbstractPoly &poly)
The representation of a single edge during network building.
Definition: NBEdge.h:71
A container for districts.
static bool dictionary(const std::string &name, const NIVissimExtendedEdgePoint &edge, const NIVissimExtendedEdgePoint &by)
bool addToNode(NBNode *node, NBDistrictCont &dc, NBNodeCont &nc, NBEdgeCont &ec)
NIVissimExtendedEdgePoint myEdge
Storage for edges, including some functionality operating on multiple edges.
Definition: NBEdgeCont.h:66
std::map< int, NIVissimDisturbance * > DictType
NBConnection getConnection(NBNode *node, int aedgeid)
NIVissimExtendedEdgePoint myDisturbance
Represents a single node (junction) during network building.
Definition: NBNode.h:75
NIVissimDisturbance(int id, const std::string &name, const NIVissimExtendedEdgePoint &edge, const NIVissimExtendedEdgePoint &by)
static void dict_SetDisturbances()
Container for nodes during the netbuilding process.
Definition: NBNodeCont.h:64