SUMO - Simulation of Urban MObility
NIVissimDisturbance.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2002-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
18 // -------------------
19 /****************************************************************************/
20 #ifndef NIVissimDisturbance_h
21 #define NIVissimDisturbance_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include <map>
34 #include <string>
36 #include <netbuild/NBConnection.h>
40 
41 
42 // ===========================================================================
43 // class declarations
44 // ===========================================================================
45 class NBNode;
46 class NBEdge;
47 class NBDistrictCont;
48 
51 public:
52  NIVissimDisturbance(int id, const std::string& name,
53  const NIVissimExtendedEdgePoint& edge,
54  const NIVissimExtendedEdgePoint& by);
55  virtual ~NIVissimDisturbance();
56  void computeBounding();
57  bool addToNode(NBNode* node, NBDistrictCont& dc,
58  NBNodeCont& nc, NBEdgeCont& ec);
59  int getEdgeID() const {
60  return myEdge.getEdgeID();
61  }
62  int getDisturbanceID() const {
63  return myDisturbance.getEdgeID();
64  }
65  NBConnection getConnection(NBNode* node, int aedgeid);
66 
67 public:
68  static bool dictionary(const std::string& name,
69  const NIVissimExtendedEdgePoint& edge,
70  const NIVissimExtendedEdgePoint& by);
71  static bool dictionary(int id, NIVissimDisturbance* o);
72  static NIVissimDisturbance* dictionary(int id);
73  static std::vector<int> getWithin(const AbstractPoly& poly);
74  static void clearDict();
75  static void dict_SetDisturbances();
76  static void reportRefused();
77 
78 private:
79  int myID;
80  int myNode;
81  std::string myName;
84 
85  typedef std::map<int, NIVissimDisturbance*> DictType;
86  static DictType myDict;
87  static int myRunningID;
88  static int refusedProhibits;
89 };
90 
91 
92 #endif
93 
94 /****************************************************************************/
95 
static DictType myDict
static std::vector< int > getWithin(const AbstractPoly &poly)
The representation of a single edge during network building.
Definition: NBEdge.h:70
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:74
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:66