tlist.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef TAGLIB_LIST_H
00023 #define TAGLIB_LIST_H
00024
00025 #include "taglib.h"
00026
00027 #include <list>
00028
00029 namespace TagLib {
00030
00032
00049 template <class T> class List
00050 {
00051 public:
00052 #ifndef DO_NOT_DOCUMENT
00053 typedef typename std::list<T>::iterator Iterator;
00054 typedef typename std::list<T>::const_iterator ConstIterator;
00055 #endif
00056
00060 List();
00061
00067 List(const List<T> &l);
00068
00073 virtual ~List();
00074
00079 Iterator begin();
00080
00085 ConstIterator begin() const;
00086
00091 Iterator end();
00092
00097 ConstIterator end() const;
00098
00102 void insert(Iterator it, const T &value);
00103
00109 void sortedInsert(const T &value, bool unique = false);
00110
00115 List<T> &append(const T &item);
00116
00121 List<T> &append(const List<T> &l);
00122
00127 List<T> &prepend(const T &item);
00128
00133 List<T> &prepend(const List<T> &l);
00134
00141 void clear();
00142
00146 uint size() const;
00147 bool isEmpty() const;
00148
00152 Iterator find(const T &value);
00153
00157 ConstIterator find(const T &value) const;
00158
00162 bool contains(const T &value) const;
00163
00167 void erase(Iterator it);
00168
00172 const T &front() const;
00173
00177 T &front();
00178
00182 const T &back() const;
00183
00187 T &back();
00188
00197 void setAutoDelete(bool autoDelete);
00198
00204 T &operator[](uint i);
00205
00211 const T &operator[](uint i) const;
00212
00218 List<T> &operator=(const List<T> &l);
00219
00224 bool operator==(const List<T> &l) const;
00225
00226 protected:
00227
00228
00229
00230
00231
00232 void detach();
00233
00234 private:
00235 #ifndef DO_NOT_DOCUMENT
00236 template <class TP> class ListPrivate;
00237 ListPrivate<T> *d;
00238 #endif
00239 };
00240
00241 }
00242
00243
00244
00245
00246 #include "tlist.tcc"
00247
00248 #endif