tpropertymap.h
Go to the documentation of this file.
1 /***************************************************************************
2  copyright : (C) 2012 by Michael Helmling
3  email : helmling@mathematik.uni-kl.de
4  ***************************************************************************/
5 
6 /***************************************************************************
7  * This library is free software; you can redistribute it and/or modify *
8  * it under the terms of the GNU Lesser General Public License version *
9  * 2.1 as published by the Free Software Foundation. *
10  * *
11  * This library is distributed in the hope that it will be useful, but *
12  * WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14  * Lesser General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU Lesser General Public *
17  * License along with this library; if not, write to the Free Software *
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
19  * 02110-1301 USA *
20  * *
21  * Alternatively, this file is available under the Mozilla Public *
22  * License Version 1.1. You may obtain a copy of the License at *
23  * http://www.mozilla.org/MPL/ *
24  ***************************************************************************/
25 
26 #ifndef TAGLIB_PROPERTYMAP_H_
27 #define TAGLIB_PROPERTYMAP_H_
28 
29 #include "tmap.h"
30 #include "tstringlist.h"
31 
32 namespace TagLib {
33 
35 
37 
109  {
110  public:
111 
112  typedef SimplePropertyMap::Iterator Iterator;
113  typedef SimplePropertyMap::ConstIterator ConstIterator;
114 
115  PropertyMap();
116 
117  PropertyMap(const PropertyMap &m);
118 
124  PropertyMap(const SimplePropertyMap &m);
125 
126  virtual ~PropertyMap();
127 
134  bool insert(const String &key, const StringList &values);
135 
142  bool replace(const String &key, const StringList &values);
143 
147  Iterator find(const String &key);
148 
152  ConstIterator find(const String &key) const;
153 
157  bool contains(const String &key) const;
158 
164  bool contains(const PropertyMap &other) const;
165 
169  PropertyMap &erase(const String &key);
170 
174  PropertyMap &erase(const PropertyMap &other);
175 
182  PropertyMap &merge(const PropertyMap &other);
183 
190  const StringList &operator[](const String &key) const;
191 
199  StringList &operator[](const String &key);
200 
204  bool operator==(const PropertyMap &other) const;
205 
209  bool operator!=(const PropertyMap &other) const;
210 
220  StringList &unsupportedData();
221  const StringList &unsupportedData() const;
222 
226  void removeEmpty();
227 
228  String toString() const;
229 
230  private:
231 
232 
233  StringList unsupported;
234  };
235 
236 }
237 #endif /* TAGLIB_PROPERTYMAP_H_ */
A map for format-independent tag representations.
Definition: tpropertymap.h:108
SimplePropertyMap::ConstIterator ConstIterator
Definition: tpropertymap.h:113
A wide string class suitable for unicode.
Definition: tstring.h:84
Map< String, StringList > SimplePropertyMap
Definition: tpropertymap.h:34
A generic, implicitly shared map.
Definition: tmap.h:43
A list of strings.
Definition: tstringlist.h:45
SimplePropertyMap::Iterator Iterator
Definition: tpropertymap.h:112
#define TAGLIB_EXPORT
Definition: taglib_export.h:40