| TagLib 1.13 |  |

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
34 extern template class TAGLIB_EXPORT TagLib::Map<TagLib::String, TagLib::StringList>;
35#endif
36
37 namespace TagLib {
38
39 typedef Map<String,StringList> SimplePropertyMap;
40
42
118 class TAGLIB_EXPORT PropertyMap: public SimplePropertyMap
119 {
120 public:
121
122 typedef SimplePropertyMap::Iterator Iterator;
123 typedef SimplePropertyMap::ConstIterator ConstIterator;
124
125 PropertyMap();
126
127 PropertyMap(const PropertyMap &m);
128
134 PropertyMap(const SimplePropertyMap &m);
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 const StringList value(const String &key,
201 const StringList &defaultValue = StringList()) const;
202
209 const StringList &operator[](const String &key) const;
210
218 StringList &operator[](const String &key);
219
223 bool operator==(const PropertyMap &other) const;
224
228 bool operator!=(const PropertyMap &other) const;
229
239 StringList &unsupportedData();
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}
256#endif /* TAGLIB_PROPERTYMAP_H_ */
TagLib::Map
A generic, implicitly shared map.
Definition: tmap.h:44
TagLib::PropertyMap
A map for format-independent <key,valuelist> tag representations.
Definition: tpropertymap.h:119
TagLib::PropertyMap::contains
bool contains(const String &key) const
TagLib::PropertyMap::operator[]
const StringList & operator[](const String &key) const
TagLib::PropertyMap::operator!=
bool operator!=(const PropertyMap &other) const
TagLib::PropertyMap::merge
PropertyMap & merge(const PropertyMap &other)
TagLib::PropertyMap::operator[]
StringList & operator[](const String &key)
TagLib::PropertyMap::find
Iterator find(const String &key)
TagLib::PropertyMap::unsupportedData
const StringList & unsupportedData() const
TagLib::PropertyMap::Iterator
SimplePropertyMap::Iterator Iterator
Definition: tpropertymap.h:122
TagLib::PropertyMap::find
ConstIterator find(const String &key) const
TagLib::PropertyMap::~PropertyMap
virtual ~PropertyMap()
TagLib::PropertyMap::removeEmpty
void removeEmpty()
TagLib::PropertyMap::ConstIterator
SimplePropertyMap::ConstIterator ConstIterator
Definition: tpropertymap.h:123
TagLib::PropertyMap::contains
bool contains(const PropertyMap &other) const
TagLib::PropertyMap::unsupportedData
StringList & unsupportedData()
TagLib::PropertyMap::PropertyMap
PropertyMap()
TagLib::PropertyMap::erase
PropertyMap & erase(const PropertyMap &other)
TagLib::PropertyMap::toString
String toString() const
TagLib::PropertyMap::replace
bool replace(const String &key, const StringList &values)
TagLib::PropertyMap::erase
PropertyMap & erase(const String &key)
TagLib::PropertyMap::insert
bool insert(const String &key, const StringList &values)
TagLib::PropertyMap::PropertyMap
PropertyMap(const SimplePropertyMap &m)
TagLib::PropertyMap::value
const StringList value(const String &key, const StringList &defaultValue=StringList()) const
TagLib::PropertyMap::PropertyMap
PropertyMap(const PropertyMap &m)
TagLib::PropertyMap::operator==
bool operator==(const PropertyMap &other) const
TagLib::StringList
A list of strings.
Definition: tstringlist.h:46
TagLib::String
A wide string class suitable for unicode.
Definition: tstring.h:85
TagLib
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41
TagLib::SimplePropertyMap
Map< String, StringList > SimplePropertyMap
Definition: tpropertymap.h:39
TAGLIB_EXPORT
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
tmap.h
tstringlist.h