SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00008 // A storage for type mappings 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 PCTypeMap_h 00022 #define PCTypeMap_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 <string> 00035 #include <map> 00036 00037 00038 // =========================================================================== 00039 // class declarations 00040 // =========================================================================== 00048 class PCTypeMap { 00049 public: 00051 PCTypeMap() ; 00052 00053 00055 ~PCTypeMap() ; 00056 00057 00062 struct TypeDef { 00064 std::string id; 00066 std::string color; 00068 std::string prefix; 00070 int layer; 00072 bool discard; 00074 bool allowFill; 00075 00076 }; 00077 00078 00090 bool add(const std::string& id, const std::string& newid, const std::string& color, 00091 const std::string& prefix, int layer, bool discard, bool allowFill) ; 00092 00093 00101 const TypeDef& get(const std::string& id) ; 00102 00103 00108 bool has(const std::string& id) ; 00109 00110 00111 protected: 00113 std::map<std::string, TypeDef> myTypes; 00114 00115 }; 00116 00117 00118 #endif 00119 00120 /****************************************************************************/ 00121