tpropertymap.h
Go to the documentation of this file.
/***************************************************************************
copyright : (C) 2012 by Michael Helmling
email : helmling@mathematik.uni-kl.de
***************************************************************************/
/***************************************************************************
* This library is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License version *
* 2.1 as published by the Free Software Foundation. *
* *
* This library is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
* 02110-1301 USA *
* *
* Alternatively, this file is available under the Mozilla Public *
* License Version 1.1. You may obtain a copy of the License at *
* http://www.mozilla.org/MPL/ *
***************************************************************************/
#ifndef TAGLIB_PROPERTYMAP_H
#define TAGLIB_PROPERTYMAP_H
#include "tmap.h"
#include "tstringlist.h"
#ifdef _MSC_VER
// Explained at end of tpropertymap.cpp
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
extern template class TagLib::Map<TagLib::String, TagLib::StringList>;
#endif
namespace TagLib {
using SimplePropertyMap = Map<String, StringList>;
class PropertyMap: public SimplePropertyMap
{
public:
using Iterator = SimplePropertyMap::Iterator;
using ConstIterator = SimplePropertyMap::ConstIterator;
TAGLIB_EXPORT
PropertyMap();
TAGLIB_EXPORT
PropertyMap(const PropertyMap &m);
TAGLIB_EXPORT
PropertyMap &operator=(const PropertyMap &other);
TAGLIB_EXPORT
PropertyMap(const SimplePropertyMap &m);
TAGLIB_EXPORT
~PropertyMap();
TAGLIB_EXPORT
bool insert(const String &key, const StringList &values);
TAGLIB_EXPORT
bool replace(const String &key, const StringList &values);
TAGLIB_EXPORT
Iterator find(const String &key);
TAGLIB_EXPORT
ConstIterator find(const String &key) const;
TAGLIB_EXPORT
bool contains(const String &key) const;
TAGLIB_EXPORT
bool contains(const PropertyMap &other) const;
TAGLIB_EXPORT
PropertyMap &erase(const String &key);
TAGLIB_EXPORT
PropertyMap &erase(const PropertyMap &other);
TAGLIB_EXPORT
PropertyMap &merge(const PropertyMap &other);
TAGLIB_EXPORT
StringList value(const String &key,
const StringList &defaultValue = StringList()) const;
TAGLIB_EXPORT
const StringList &operator[](const String &key) const;
TAGLIB_EXPORT
StringList &operator[](const String &key);
TAGLIB_EXPORT
bool operator==(const PropertyMap &other) const;
TAGLIB_EXPORT
bool operator!=(const PropertyMap &other) const;
TAGLIB_EXPORT
const StringList &unsupportedData() const;
TAGLIB_EXPORT
void addUnsupportedData(const String &key);
TAGLIB_EXPORT
void removeEmpty();
TAGLIB_EXPORT
String toString() const;
private:
class PropertyMapPrivate;
std::unique_ptr<PropertyMapPrivate> d;
};
} // namespace TagLib
#endif /* TAGLIB_PROPERTYMAP_H */
TagLib::Map
A generic, implicitly shared map.
Definition tmap.h:45
TagLib::PropertyMap::PropertyMap
TAGLIB_EXPORT PropertyMap(const PropertyMap &m)
TagLib::PropertyMap::merge
TAGLIB_EXPORT PropertyMap & merge(const PropertyMap &other)
TagLib::PropertyMap::PropertyMap
TAGLIB_EXPORT PropertyMap(const SimplePropertyMap &m)
TagLib::PropertyMap::PropertyMap
TAGLIB_EXPORT PropertyMap()
TagLib::PropertyMap::contains
TAGLIB_EXPORT bool contains(const PropertyMap &other) const
TagLib::PropertyMap::replace
TAGLIB_EXPORT bool replace(const String &key, const StringList &values)
TagLib::PropertyMap::toString
TAGLIB_EXPORT String toString() const
TagLib::PropertyMap::erase
TAGLIB_EXPORT PropertyMap & erase(const String &key)
TagLib::PropertyMap::operator[]
TAGLIB_EXPORT const StringList & operator[](const String &key) const
TagLib::PropertyMap::ConstIterator
SimplePropertyMap::ConstIterator ConstIterator
Definition tpropertymap.h:126
TagLib::PropertyMap::operator==
TAGLIB_EXPORT bool operator==(const PropertyMap &other) const
TagLib::PropertyMap::removeEmpty
TAGLIB_EXPORT void removeEmpty()
TagLib::PropertyMap::find
TAGLIB_EXPORT Iterator find(const String &key)
TagLib::PropertyMap::addUnsupportedData
TAGLIB_EXPORT void addUnsupportedData(const String &key)
TagLib::PropertyMap::value
TAGLIB_EXPORT StringList value(const String &key, const StringList &defaultValue=StringList()) const
TagLib::PropertyMap::Iterator
SimplePropertyMap::Iterator Iterator
Definition tpropertymap.h:125
TagLib::PropertyMap::insert
TAGLIB_EXPORT bool insert(const String &key, const StringList &values)
TagLib::PropertyMap::erase
TAGLIB_EXPORT PropertyMap & erase(const PropertyMap &other)
TagLib::PropertyMap::contains
TAGLIB_EXPORT bool contains(const String &key) const
TagLib::PropertyMap::operator[]
TAGLIB_EXPORT StringList & operator[](const String &key)
TagLib::PropertyMap::unsupportedData
TAGLIB_EXPORT const StringList & unsupportedData() const
TagLib::PropertyMap::operator!=
TAGLIB_EXPORT bool operator!=(const PropertyMap &other) const
TagLib::PropertyMap::operator=
TAGLIB_EXPORT PropertyMap & operator=(const PropertyMap &other)
TagLib::PropertyMap::find
TAGLIB_EXPORT ConstIterator find(const String &key) const
TagLib::PropertyMap::~PropertyMap
TAGLIB_EXPORT ~PropertyMap()
TagLib::StringList
A list of strings.
Definition tstringlist.h:44
TagLib::String
A wide string class suitable for unicode.
Definition tstring.h:83
TagLib
A namespace for all TagLib related classes and functions.
Definition apefile.h:41
TagLib::SimplePropertyMap
Map< String, StringList > SimplePropertyMap
Definition tpropertymap.h:40
TAGLIB_EXPORT
#define TAGLIB_EXPORT
Definition taglib_export.h:40
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition taglib_export.h:55
tmap.h
tstringlist.h