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 
114  {
115  public:
116 
117  typedef SimplePropertyMap::Iterator Iterator;
118  typedef SimplePropertyMap::ConstIterator ConstIterator;
119 
120  PropertyMap();
121 
122  PropertyMap(const PropertyMap &m);
123 
129  PropertyMap(const SimplePropertyMap &m);
130 
131  virtual ~PropertyMap();
132 
139  bool insert(const String &key, const StringList &values);
140 
147  bool replace(const String &key, const StringList &values);
148 
152  Iterator find(const String &key);
153 
157  ConstIterator find(const String &key) const;
158 
162  bool contains(const String &key) const;
163 
169  bool contains(const PropertyMap &other) const;
170 
174  PropertyMap &erase(const String &key);
175 
179  PropertyMap &erase(const PropertyMap &other);
180 
187  PropertyMap &merge(const PropertyMap &other);
188 
195  const StringList &operator[](const String &key) const;
196 
204  StringList &operator[](const String &key);
205 
209  bool operator==(const PropertyMap &other) const;
210 
214  bool operator!=(const PropertyMap &other) const;
215 
225  StringList &unsupportedData();
226  const StringList &unsupportedData() const;
227 
231  void removeEmpty();
232 
233  String toString() const;
234 
235  private:
236 
237 
238  StringList unsupported;
239  };
240 
241 }
242 #endif /* TAGLIB_PROPERTYMAP_H_ */
A map for format-independent <key,valuelist> tag representations.
Definition: tpropertymap.h:113
SimplePropertyMap::ConstIterator ConstIterator
Definition: tpropertymap.h:118
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:117
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41