SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00009 // Interface for building edges 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 NLEdgeControlBuilder_h 00023 #define NLEdgeControlBuilder_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 <string> 00036 #include <vector> 00037 #include <microsim/MSEdge.h> 00038 #include <utils/geom/PositionVector.h> 00039 00040 00041 // =========================================================================== 00042 // class declarations 00043 // =========================================================================== 00044 class MSEdgeControl; 00045 class MSLane; 00046 class MSNet; 00047 class OutputDevice; 00048 00049 00050 // =========================================================================== 00051 // class definitions 00052 // =========================================================================== 00064 class NLEdgeControlBuilder { 00065 public: 00067 typedef std::vector<MSEdge*> EdgeCont; 00068 00069 public: 00071 NLEdgeControlBuilder(); 00072 00073 00075 virtual ~NLEdgeControlBuilder(); 00076 00077 00090 void beginEdgeParsing(const std::string& id, MSEdge::EdgeBasicFunction function, 00091 const std::string& streetName); 00092 00093 00111 virtual MSLane* addLane(const std::string& id, SUMOReal maxSpeed, 00112 SUMOReal length, const PositionVector& shape, 00113 SUMOReal width, SVCPermissions permissions); 00114 00115 00118 virtual MSEdge* closeEdge(); 00119 00121 MSEdgeControl* build(); 00122 00123 00133 virtual MSEdge* buildEdge(const std::string& id, const std::string& streetName = "") ; 00134 00135 00136 protected: 00138 unsigned int myCurrentNumericalLaneID; 00139 00141 unsigned int myCurrentNumericalEdgeID; 00142 00144 EdgeCont myEdges; 00145 00147 MSEdge* myActiveEdge; 00148 00150 std::vector<MSLane*> *myLaneStorage; 00151 00153 MSEdge::EdgeBasicFunction myFunction; 00154 00155 private: 00157 NLEdgeControlBuilder(const NLEdgeControlBuilder& s); 00158 00160 NLEdgeControlBuilder& operator=(const NLEdgeControlBuilder& s); 00161 00162 }; 00163 00164 00165 #endif 00166 00167 /****************************************************************************/ 00168