tlist.h
Go to the documentation of this file.
/***************************************************************************
copyright : (C) 2002 - 2008 by Scott Wheeler
email : wheeler@kde.org
***************************************************************************/
/***************************************************************************
* 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_LIST_H
#define TAGLIB_LIST_H
#include <list>
#include <initializer_list>
#include <memory>
namespace TagLib {
template <class T> class List
{
public:
#ifndef DO_NOT_DOCUMENT
using Iterator = typename std::list<T>::iterator;
using ConstIterator = typename std::list<T>::const_iterator;
#endif
List();
List(const List<T> &l);
List(std::initializer_list<T> init);
~List();
Iterator begin();
ConstIterator begin() const;
ConstIterator cbegin() const;
Iterator end();
ConstIterator end() const;
ConstIterator cend() const;
Iterator insert(Iterator it, const T &item);
List<T> &sortedInsert(const T &value, bool unique = false);
List<T> &append(const T &item);
List<T> &append(const List<T> &l);
List<T> &prepend(const T &item);
List<T> &prepend(const List<T> &l);
List<T> &clear();
unsigned int size() const;
bool isEmpty() const;
Iterator find(const T &value);
ConstIterator find(const T &value) const;
ConstIterator cfind(const T &value) const;
bool contains(const T &value) const;
Iterator erase(Iterator it);
const T &front() const;
T &front();
const T &back() const;
T &back();
void setAutoDelete(bool autoDelete);
bool autoDelete() const;
T &operator[](unsigned int i);
const T &operator[](unsigned int i) const;
List<T> &operator=(const List<T> &l);
List<T> &operator=(std::initializer_list<T> init);
void swap(List<T> &l) noexcept;
bool operator==(const List<T> &l) const;
bool operator!=(const List<T> &l) const;
void sort();
template<class Compare>
void sort(Compare&& comp);
protected:
void detach();
private:
#ifndef DO_NOT_DOCUMENT
template <class TP> class ListPrivate;
std::shared_ptr<ListPrivate<T>> d;
#endif
};
} // namespace TagLib
// Since GCC doesn't support the "export" keyword, we have to include the
// implementation.
#include "tlist.tcc"
#endif
TagLib::List::operator[]
T & operator[](unsigned int i)
TagLib::List::~List
~List()
TagLib::List::operator=
List< T > & operator=(const List< T > &l)
TagLib::List::cbegin
ConstIterator cbegin() const
TagLib::List::insert
Iterator insert(Iterator it, const T &item)
TagLib::List::List
List(const List< T > &l)
TagLib::List::sortedInsert
List< T > & sortedInsert(const T &value, bool unique=false)
TagLib::List::erase
Iterator erase(Iterator it)
TagLib::List::append
List< T > & append(const T &item)
TagLib::List::front
const T & front() const
TagLib::List::cend
ConstIterator cend() const
TagLib::List::begin
Iterator begin()
TagLib::List::find
ConstIterator find(const T &value) const
TagLib::List::swap
void swap(List< T > &l) noexcept
TagLib::List::clear
List< T > & clear()
TagLib::List::setAutoDelete
void setAutoDelete(bool autoDelete)
TagLib::List::detach
void detach()
TagLib::List::sort
void sort()
TagLib::List::sort
void sort(Compare &&comp)
TagLib::List::find
Iterator find(const T &value)
TagLib::List::List
List()
TagLib::List::operator[]
const T & operator[](unsigned int i) const
TagLib::List::cfind
ConstIterator cfind(const T &value) const
TagLib::List::prepend
List< T > & prepend(const T &item)
TagLib::List::front
T & front()
TagLib::List::append
List< T > & append(const List< T > &l)
TagLib::List::begin
ConstIterator begin() const
TagLib::List::prepend
List< T > & prepend(const List< T > &l)
TagLib::List::size
unsigned int size() const
TagLib::List< Attribute >::autoDelete
bool autoDelete() const
TagLib::List::operator==
bool operator==(const List< T > &l) const
TagLib::List::back
T & back()
TagLib::List::back
const T & back() const
TagLib::List::operator=
List< T > & operator=(std::initializer_list< T > init)
TagLib::List::List
List(std::initializer_list< T > init)
TagLib::List::end
ConstIterator end() const
TagLib::List::contains
bool contains(const T &value) const
TagLib::List::end
Iterator end()
TagLib::List::isEmpty
bool isEmpty() const
TagLib::List::operator!=
bool operator!=(const List< T > &l) const
TagLib
A namespace for all TagLib related classes and functions.
Definition apefile.h:41