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
00152 unsigned int size() const;
00153
00159 bool isEmpty() const;
00160
00164 Iterator find(const T &value);
00165
00169 ConstIterator find(const T &value) const;
00170
00174 bool contains(const T &value) const;
00175
00179 Iterator erase(Iterator it);
00180
00184 const T &front() const;
00185
00189 T &front();
00190
00194 const T &back() const;
00195
00199 T &back();
00200
00209 void setAutoDelete(bool autoDelete);
00210
00216 T &operator[](unsigned int i);
00217
00223 const T &operator[](unsigned int i) const;
00224
00230 List<T> &operator=(const List<T> &l);
00231
00236 bool operator==(const List<T> &l) const;
00237
00241 bool operator!=(const List<T> &l) const;
00242
00243 protected:
00244
00245
00246
00247
00248
00249 void detach();
00250
00251 private:
00252 #ifndef DO_NOT_DOCUMENT
00253 template <class TP> class ListPrivate;
00254 ListPrivate<T> *d;
00255 #endif
00256 };
00257
00258 }
00259
00260
00261
00262
00263 #include "tlist.tcc"
00264
00265 #endif