SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00009 // A netgen-representation of an edge 00010 /****************************************************************************/ 00011 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00012 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors 00013 /****************************************************************************/ 00014 // 00015 // This file is part of SUMO. 00016 // SUMO is free software: you can redistribute it and/or modify 00017 // it under the terms of the GNU General Public License as published by 00018 // the Free Software Foundation, either version 3 of the License, or 00019 // (at your option) any later version. 00020 // 00021 /****************************************************************************/ 00022 #ifndef NGNetElements_h 00023 #define NGNetElements_h 00024 00025 00026 // =========================================================================== 00027 // included modules 00028 // =========================================================================== 00029 #ifdef _MSC_VER 00030 #include <windows_config.h> 00031 #else 00032 #include <config.h> 00033 #endif 00034 00035 #include <list> 00036 #include <utils/common/UtilExceptions.h> 00037 #include <utils/geom/Position.h> 00038 #include <utils/geom/GeomHelper.h> 00039 00040 00041 // =========================================================================== 00042 // class declarations 00043 // =========================================================================== 00044 class NGNode; 00045 class NBNode; 00046 class NBEdge; 00047 class NBNetBuilder; 00048 00049 00050 // =========================================================================== 00051 // class definitions 00052 // =========================================================================== 00061 class NGEdge { 00062 public: 00071 NGEdge(const std::string& id, NGNode* startNode, NGNode* endNode) ; 00072 00073 00078 ~NGEdge() ; 00079 00080 00085 const std::string& getID() const { 00086 return myID; 00087 } 00088 00089 00094 NGNode* getStartNode() { 00095 return myStartNode; 00096 }; 00097 00098 00103 NGNode* getEndNode() { 00104 return myEndNode; 00105 }; 00106 00107 00117 NBEdge* buildNBEdge(NBNetBuilder& nb) const ; 00118 00119 00120 private: 00122 std::string myID; 00123 00125 NGNode* myStartNode; 00126 00128 NGNode* myEndNode; 00129 00130 }; 00131 00132 00137 typedef std::list<NGEdge*> NGEdgeList; 00138 00139 #endif 00140 00141 /****************************************************************************/ 00142