00001 /****************************************************************************/ 00007 // A netgen-representation of an edge 00008 /****************************************************************************/ 00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00010 // Copyright 2001-2010 DLR (http://www.dlr.de/) and contributors 00011 /****************************************************************************/ 00012 // 00013 // This program is free software; you can redistribute it and/or modify 00014 // it under the terms of the GNU General Public License as published by 00015 // the Free Software Foundation; either version 2 of the License, or 00016 // (at your option) any later version. 00017 // 00018 /****************************************************************************/ 00019 #ifndef NGNetElements_h 00020 #define NGNetElements_h 00021 00022 00023 // =========================================================================== 00024 // included modules 00025 // =========================================================================== 00026 #ifdef _MSC_VER 00027 #include <windows_config.h> 00028 #else 00029 #include <config.h> 00030 #endif 00031 00032 #include <list> 00033 #include <utils/common/UtilExceptions.h> 00034 #include <utils/geom/Position2D.h> 00035 #include <utils/geom/GeomHelper.h> 00036 00037 00038 // =========================================================================== 00039 // class declarations 00040 // =========================================================================== 00041 class NGNode; 00042 class NBNode; 00043 class NBEdge; 00044 class NBNetBuilder; 00045 00046 00047 // =========================================================================== 00048 // class definitions 00049 // =========================================================================== 00058 class NGEdge { 00059 public: 00068 NGEdge(const std::string &id, NGNode *startNode, NGNode *endNode) throw(); 00069 00070 00075 ~NGEdge() throw(); 00076 00077 00082 const std::string &getID() const throw() { 00083 return myID; 00084 } 00085 00086 00091 NGNode *getStartNode() throw() { 00092 return myStartNode; 00093 }; 00094 00095 00100 NGNode *getEndNode() throw() { 00101 return myEndNode; 00102 }; 00103 00104 00114 NBEdge *buildNBEdge(NBNetBuilder &nb) const throw(ProcessError); 00115 00116 00117 private: 00119 std::string myID; 00120 00122 NGNode *myStartNode; 00123 00125 NGNode *myEndNode; 00126 00127 }; 00128 00129 00134 typedef std::list<NGEdge*> NGEdgeList; 00135 00136 #endif 00137 00138 /****************************************************************************/ 00139
1.5.6