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-2018 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
16 // -------------------
17 /****************************************************************************/
18 #ifndef NIVissimDisturbance_h
19 #define NIVissimDisturbance_h
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #include <map>
28 #include <string>
30 #include <netbuild/NBConnection.h>
34 
35 
36 // ===========================================================================
37 // class declarations
38 // ===========================================================================
39 class NBNode;
40 class NBEdge;
41 class NBDistrictCont;
42 
45 public:
46  NIVissimDisturbance(int id, const std::string& name,
47  const NIVissimExtendedEdgePoint& edge,
48  const NIVissimExtendedEdgePoint& by);
49  virtual ~NIVissimDisturbance();
50  void computeBounding();
51  bool addToNode(NBNode* node, NBDistrictCont& dc,
52  NBNodeCont& nc, NBEdgeCont& ec);
53  int getEdgeID() const {
54  return myEdge.getEdgeID();
55  }
56  int getDisturbanceID() const {
57  return myDisturbance.getEdgeID();
58  }
59  NBConnection getConnection(NBNode* node, int aedgeid);
60 
61 public:
62  static bool dictionary(const std::string& name,
63  const NIVissimExtendedEdgePoint& edge,
64  const NIVissimExtendedEdgePoint& by);
65  static bool dictionary(int id, NIVissimDisturbance* o);
66  static NIVissimDisturbance* dictionary(int id);
67  static std::vector<int> getWithin(const AbstractPoly& poly);
68  static void clearDict();
69  static void dict_SetDisturbances();
70  static void reportRefused();
71 
72 private:
73  int myID;
74  int myNode;
75  std::string myName;
78 
79  typedef std::map<int, NIVissimDisturbance*> DictType;
80  static DictType myDict;
81  static int myRunningID;
82  static int refusedProhibits;
83 };
84 
85 
86 #endif
87 
88 /****************************************************************************/
89 
static DictType myDict
static std::vector< int > getWithin(const AbstractPoly &poly)
The representation of a single edge during network building.
Definition: NBEdge.h:65
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:61
std::map< int, NIVissimDisturbance * > DictType
NBConnection getConnection(NBNode *node, int aedgeid)
NIVissimExtendedEdgePoint myDisturbance
Represents a single node (junction) during network building.
Definition: NBNode.h:68
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:60