TagLib  2.0
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 #ifdef _MSC_VER
33 // Explained at end of tpropertymap.cpp
35 #endif
36 
37 namespace TagLib {
38 
40 
42 
122  {
123  public:
124  using Iterator = SimplePropertyMap::Iterator;
125  using ConstIterator = SimplePropertyMap::ConstIterator;
126 
128  PropertyMap();
129 
131  PropertyMap(const PropertyMap &m);
132 
134  PropertyMap &operator=(const PropertyMap &other);
135 
142  PropertyMap(const SimplePropertyMap &m);
143 
145  ~PropertyMap();
146 
154  bool insert(const String &key, const StringList &values);
155 
163  bool replace(const String &key, const StringList &values);
164 
169  Iterator find(const String &key);
170 
175  ConstIterator find(const String &key) const;
176 
181  bool contains(const String &key) const;
182 
189  bool contains(const PropertyMap &other) const;
190 
195  PropertyMap &erase(const String &key);
196 
201  PropertyMap &erase(const PropertyMap &other);
202 
210  PropertyMap &merge(const PropertyMap &other);
211 
219  StringList value(const String &key,
220  const StringList &defaultValue = StringList()) const;
221 
229  const StringList &operator[](const String &key) const;
230 
239  StringList &operator[](const String &key);
240 
245  bool operator==(const PropertyMap &other) const;
246 
251  bool operator!=(const PropertyMap &other) const;
252 
264  const StringList &unsupportedData() const;
265 
272  void addUnsupportedData(const String &key);
273 
278  void removeEmpty();
279 
281  String toString() const;
282 
283  private:
284  class PropertyMapPrivate;
285  std::unique_ptr<PropertyMapPrivate> d;
286  };
287 
288 } // namespace TagLib
289 #endif /* TAGLIB_PROPERTYMAP_H */
SimplePropertyMap::Iterator Iterator
Definition: tpropertymap.h:124
A map for format-independent <key,values> tag representations.
Definition: tpropertymap.h:121
A wide string class suitable for unicode.
Definition: tstring.h:82
A generic, implicitly shared map.
Definition: tmap.h:44
A list of strings.
Definition: tstringlist.h:43
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
SimplePropertyMap::ConstIterator ConstIterator
Definition: tpropertymap.h:125
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41