TagLib  2.0.2
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
36 #endif
37 
38 namespace TagLib {
39 
41 
43 
123  {
124  public:
125  using Iterator = SimplePropertyMap::Iterator;
126  using ConstIterator = SimplePropertyMap::ConstIterator;
127 
129  PropertyMap();
130 
132  PropertyMap(const PropertyMap &m);
133 
135  PropertyMap &operator=(const PropertyMap &other);
136 
143  PropertyMap(const SimplePropertyMap &m);
144 
146  ~PropertyMap();
147 
155  bool insert(const String &key, const StringList &values);
156 
164  bool replace(const String &key, const StringList &values);
165 
170  Iterator find(const String &key);
171 
176  ConstIterator find(const String &key) const;
177 
182  bool contains(const String &key) const;
183 
190  bool contains(const PropertyMap &other) const;
191 
196  PropertyMap &erase(const String &key);
197 
202  PropertyMap &erase(const PropertyMap &other);
203 
211  PropertyMap &merge(const PropertyMap &other);
212 
220  StringList value(const String &key,
221  const StringList &defaultValue = StringList()) const;
222 
230  const StringList &operator[](const String &key) const;
231 
240  StringList &operator[](const String &key);
241 
246  bool operator==(const PropertyMap &other) const;
247 
252  bool operator!=(const PropertyMap &other) const;
253 
265  const StringList &unsupportedData() const;
266 
273  void addUnsupportedData(const String &key);
274 
279  void removeEmpty();
280 
282  String toString() const;
283 
284  private:
285  class PropertyMapPrivate;
286  std::unique_ptr<PropertyMapPrivate> d;
287  };
288 
289 } // namespace TagLib
290 #endif /* TAGLIB_PROPERTYMAP_H */
SimplePropertyMap::Iterator Iterator
Definition: tpropertymap.h:125
A map for format-independent <key,values> tag representations.
Definition: tpropertymap.h:122
A wide string class suitable for unicode.
Definition: tstring.h:82
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition: taglib_export.h:55
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:126
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41