TagLib  1.13.1
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 
119  {
120  public:
121 
122  typedef SimplePropertyMap::Iterator Iterator;
123  typedef SimplePropertyMap::ConstIterator ConstIterator;
124 
126 
128 
135 
136  virtual ~PropertyMap();
137 
144  bool insert(const String &key, const StringList &values);
145 
152  bool replace(const String &key, const StringList &values);
153 
157  Iterator find(const String &key);
158 
162  ConstIterator find(const String &key) const;
163 
167  bool contains(const String &key) const;
168 
174  bool contains(const PropertyMap &other) const;
175 
179  PropertyMap &erase(const String &key);
180 
184  PropertyMap &erase(const PropertyMap &other);
185 
192  PropertyMap &merge(const PropertyMap &other);
193 
200  StringList value(const String &key,
201  const StringList &defaultValue = StringList()) const;
202 
209  const StringList &operator[](const String &key) const;
210 
219 
223  bool operator==(const PropertyMap &other) const;
224 
228  bool operator!=(const PropertyMap &other) const;
229 
240  const StringList &unsupportedData() const;
241 
245  void removeEmpty();
246 
247  String toString() const;
248 
249  private:
250 
251 
252  StringList unsupported;
253  };
254 
255 } // namespace TagLib
256 #endif /* TAGLIB_PROPERTYMAP_H_ */
A generic, implicitly shared map.
Definition: tmap.h:44
A map for format-independent <key,valuelist> tag representations.
Definition: tpropertymap.h:119
bool contains(const String &key) const
StringList & operator[](const String &key)
bool operator!=(const PropertyMap &other) const
StringList & unsupportedData()
Iterator find(const String &key)
PropertyMap & erase(const String &key)
SimplePropertyMap::Iterator Iterator
Definition: tpropertymap.h:122
PropertyMap & erase(const PropertyMap &other)
ConstIterator find(const String &key) const
StringList value(const String &key, const StringList &defaultValue=StringList()) const
virtual ~PropertyMap()
SimplePropertyMap::ConstIterator ConstIterator
Definition: tpropertymap.h:123
bool contains(const PropertyMap &other) const
PropertyMap & merge(const PropertyMap &other)
const StringList & operator[](const String &key) const
String toString() const
bool replace(const String &key, const StringList &values)
bool insert(const String &key, const StringList &values)
PropertyMap(const SimplePropertyMap &m)
const StringList & unsupportedData() const
PropertyMap(const PropertyMap &m)
bool operator==(const PropertyMap &other) const
A list of strings.
Definition: tstringlist.h:46
A wide string class suitable for unicode.
Definition: tstring.h:85
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41
Map< String, StringList > SimplePropertyMap
Definition: tpropertymap.h:39
#define TAGLIB_EXPORT
Definition: taglib_export.h:40