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
00023
00024
00025
00026 #ifndef TAGLIB_LIST_H
00027 #define TAGLIB_LIST_H
00028
00029 #include "taglib.h"
00030
00031 #include <list>
00032
00033 namespace TagLib {
00034
00036
00053 template <class T> class List
00054 {
00055 public:
00056 #ifndef DO_NOT_DOCUMENT
00057 typedef typename std::list<T>::iterator Iterator;
00058 typedef typename std::list<T>::const_iterator ConstIterator;
00059 #endif
00060
00064 List();
00065
00071 List(const List<T> &l);
00072
00077 virtual ~List();
00078
00083 Iterator begin();
00084
00089 ConstIterator begin() const;
00090
00095 Iterator end();
00096
00101 ConstIterator end() const;
00102
00106 Iterator insert(Iterator it, const T &value);
00107
00113 List<T> &sortedInsert(const T &value, bool unique = false);
00114
00119 List<T> &append(const T &item);
00120
00125 List<T> &append(const List<T> &l);
00126
00131 List<T> &prepend(const T &item);
00132
00137 List<T> &prepend(const List<T> &l);
00138
00145 List<T> &clear();
00146
00150 uint size() const;
00151 bool isEmpty() const;
00152
00156 Iterator find(const T &value);
00157
00161 ConstIterator find(const T &value) const;
00162
00166 bool contains(const T &value) const;
00167
00171 Iterator erase(Iterator it);
00172
00176 const T &front() const;
00177
00181 T &front();
00182
00186 const T &back() const;
00187
00191 T &back();
00192
00201 void setAutoDelete(bool autoDelete);
00202
00208 T &operator[](uint i);
00209
00215 const T &operator[](uint i) const;
00216
00222 List<T> &operator=(const List<T> &l);
00223
00228 bool operator==(const List<T> &l) const;
00229
00230 protected:
00231
00232
00233
00234
00235
00236 void detach();
00237
00238 private:
00239 #ifndef DO_NOT_DOCUMENT
00240 template <class TP> class ListPrivate;
00241 ListPrivate<T> *d;
00242 #endif
00243 };
00244
00245 }
00246
00247
00248
00249
00250 #include "tlist.tcc"
00251
00252 #endif