SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NIVissimNodeDef.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // -------------------
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
10 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software: you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation, either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 #ifndef NIVissimNodeDef_h
21 #define NIVissimNodeDef_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 <string>
34 #include <map>
35 #include <utils/geom/Boundary.h>
37 #include "NIVissimNodeCluster.h"
38 
39 
41 public:
42  NIVissimNodeDef(int id, const std::string& name);
43  virtual ~NIVissimNodeDef();
44  int buildNodeCluster();
45 // virtual void computeBounding() = 0;
46 // bool partialWithin(const AbstractPoly &p, SUMOReal off=0.0) const;
47  virtual void searchAndSetConnections() = 0;
48  virtual SUMOReal getEdgePosition(int edgeid) const = 0;
49 
50 public:
51  static bool dictionary(int id, NIVissimNodeDef* o);
52  static NIVissimNodeDef* dictionary(int id);
53 // static std::vector<int> getWithin(const AbstractPoly &p, SUMOReal off=0.0);
54 // static void buildNodeClusters();
55  static void dict_assignConnectionsToNodes();
56  static size_t dictSize();
57  static void clearDict();
58  static int getMaxID();
59 protected:
60  int myID;
61  std::string myName;
62 
63 private:
64  typedef std::map<int, NIVissimNodeDef*> DictType;
65  static DictType myDict;
66  static int myMaxID;
67 };
68 
69 
70 #endif
71 
72 /****************************************************************************/
73