SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00008 // A structure storing information about which edges were joined 00009 /****************************************************************************/ 00010 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00011 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors 00012 /****************************************************************************/ 00013 // 00014 // This file is part of SUMO. 00015 // SUMO is free software: you can redistribute it and/or modify 00016 // it under the terms of the GNU General Public License as published by 00017 // the Free Software Foundation, either version 3 of the License, or 00018 // (at your option) any later version. 00019 // 00020 /****************************************************************************/ 00021 #ifndef NBJoinedEdgesMap_h 00022 #define NBJoinedEdgesMap_h 00023 00024 00025 // =========================================================================== 00026 // included modules 00027 // =========================================================================== 00028 #ifdef _MSC_VER 00029 #include <windows_config.h> 00030 #else 00031 #include <config.h> 00032 #endif 00033 00034 #include <iostream> 00035 #include <vector> 00036 #include <map> 00037 #include <string> 00038 00039 00040 // =========================================================================== 00041 // class declarations 00042 // =========================================================================== 00043 class NBEdgeCont; 00044 00045 00046 // =========================================================================== 00047 // class definitions 00048 // =========================================================================== 00053 class NBJoinedEdgesMap { 00054 public: 00056 NBJoinedEdgesMap(); 00057 00059 ~NBJoinedEdgesMap(); 00060 00063 void init(NBEdgeCont& ec); 00064 00067 void appended(const std::string& to, const std::string& what); 00068 00071 friend std::ostream& operator<<(std::ostream& os, 00072 const NBJoinedEdgesMap& map); 00073 00074 private: 00076 typedef std::vector<std::string> MappedEdgesVector; 00077 00079 typedef std::map<std::string, MappedEdgesVector> JoinedEdgesMap; 00080 00082 JoinedEdgesMap myMap; 00083 00084 std::map<std::string, SUMOReal> myLengths; 00085 00086 }; 00087 00088 00089 00090 00091 #endif 00092 00093 /****************************************************************************/ 00094