![]() |
|
00001 /*************************************************************************** 00002 copyright : (C) 2012 by Michael Helmling 00003 email : helmling@mathematik.uni-kl.de 00004 ***************************************************************************/ 00005 00006 /*************************************************************************** 00007 * This library is free software; you can redistribute it and/or modify * 00008 * it under the terms of the GNU Lesser General Public License version * 00009 * 2.1 as published by the Free Software Foundation. * 00010 * * 00011 * This library is distributed in the hope that it will be useful, but * 00012 * WITHOUT ANY WARRANTY; without even the implied warranty of * 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00014 * Lesser General Public License for more details. * 00015 * * 00016 * You should have received a copy of the GNU Lesser General Public * 00017 * License along with this library; if not, write to the Free Software * 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * 00019 * MA 02110-1301 USA * 00020 ***************************************************************************/ 00021 00022 #ifndef TAGLIB_PROPERTYMAP_H_ 00023 #define TAGLIB_PROPERTYMAP_H_ 00024 00025 #include "tmap.h" 00026 #include "tstringlist.h" 00027 00028 namespace TagLib { 00029 00030 typedef Map<String,StringList> SimplePropertyMap; 00031 00033 00104 class TAGLIB_EXPORT PropertyMap: public SimplePropertyMap 00105 { 00106 public: 00107 00108 typedef SimplePropertyMap::Iterator Iterator; 00109 typedef SimplePropertyMap::ConstIterator ConstIterator; 00110 00111 PropertyMap(); 00112 00113 PropertyMap(const PropertyMap &m); 00114 00120 PropertyMap(const SimplePropertyMap &m); 00121 00122 virtual ~PropertyMap(); 00123 00130 bool insert(const String &key, const StringList &values); 00131 00138 bool replace(const String &key, const StringList &values); 00139 00143 Iterator find(const String &key); 00144 00148 ConstIterator find(const String &key) const; 00149 00153 bool contains(const String &key) const; 00154 00160 bool contains(const PropertyMap &other) const; 00161 00165 PropertyMap &erase(const String &key); 00166 00170 PropertyMap &erase(const PropertyMap &other); 00171 00178 PropertyMap &merge(const PropertyMap &other); 00179 00186 const StringList &operator[](const String &key) const; 00187 00195 StringList &operator[](const String &key); 00196 00200 bool operator==(const PropertyMap &other) const; 00201 00205 bool operator!=(const PropertyMap &other) const; 00206 00216 StringList &unsupportedData(); 00217 const StringList &unsupportedData() const; 00218 00222 void removeEmpty(); 00223 00224 String toString() const; 00225 00226 private: 00227 00228 00229 StringList unsupported; 00230 }; 00231 00232 } 00233 #endif /* TAGLIB_PROPERTYMAP_H_ */