SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NIVissimAbstractEdge.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // -------------------
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
11 // Copyright (C) 2001-2014 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 NIVissimAbstractEdge_h
22 #define NIVissimAbstractEdge_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>
36 
37 
38 // ===========================================================================
39 // class definitions
40 // ===========================================================================
45 public:
46  NIVissimAbstractEdge(int id, const PositionVector& geom);
47  virtual ~NIVissimAbstractEdge();
49  void splitAssigning();
50  bool crossesEdge(NIVissimAbstractEdge* c) const;
52  bool overlapsWith(const AbstractPoly& p, SUMOReal offset = 0.0) const;
53  virtual void setNodeCluster(int nodeid) = 0;
54  bool hasNodeCluster() const;
56  const Position& p2) const;
57 
58  virtual void buildGeom() = 0;
59  int getID() const;
60  const PositionVector& getGeometry() const;
61 
62  void addDisturbance(int disturbance);
63 
64  const std::vector<int>& getDisturbances() const;
65 
66 public:
67  static bool dictionary(int id, NIVissimAbstractEdge* e);
68  static NIVissimAbstractEdge* dictionary(int id);
69  static void splitAndAssignToNodes();
70  static std::vector<int> getWithin(const AbstractPoly& p, SUMOReal offset = 0.0);
71  static void clearDict();
72 
73 
74 protected:
75  int myID;
77  std::vector<int> myDisturbances;
78  int myNode;
79 
80 private:
81  typedef std::map<int, NIVissimAbstractEdge*> DictType;
82  static DictType myDict;
83 };
84 
85 
86 #endif
87 
88 /****************************************************************************/
89