tmap.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_MAP_H
00027 #define TAGLIB_MAP_H
00028
00029 #include <map>
00030 using namespace std;
00031
00032 #include "taglib.h"
00033
00034 namespace TagLib {
00035
00037
00044 template <class Key, class T> class Map
00045 {
00046 public:
00047 #ifndef DO_NOT_DOCUMENT
00048 #ifdef WANT_CLASS_INSTANTIATION_OF_MAP
00049
00050
00051
00052
00053
00054
00055
00056
00057 typedef typename std::map<class Key, class T>::iterator Iterator;
00058 typedef typename std::map<class Key, class T>::const_iterator ConstIterator;
00059 #else
00060 typedef typename std::map<Key, T>::iterator Iterator;
00061 typedef typename std::map<Key, T>::const_iterator ConstIterator;
00062 #endif
00063 #endif
00064
00068 Map();
00069
00075 Map(const Map<Key, T> &m);
00076
00080 virtual ~Map();
00081
00086 Iterator begin();
00087
00092 ConstIterator begin() const;
00093
00098 Iterator end();
00099
00104 ConstIterator end() const;
00105
00110 Map<Key, T> &insert(const Key &key, const T &value);
00111
00116 Map<Key, T> &clear();
00117
00123 uint size() const;
00124
00130 bool isEmpty() const;
00131
00135 Iterator find(const Key &key);
00136
00140 ConstIterator find(const Key &key) const;
00141
00145 bool contains(const Key &key) const;
00146
00150 Map<Key, T> &erase(Iterator it);
00151
00155 Map<Key, T> &erase(const Key &key);
00156
00162 const T &operator[](const Key &key) const;
00163
00169 T &operator[](const Key &key);
00170
00176 Map<Key, T> &operator=(const Map<Key, T> &m);
00177
00178 protected:
00179
00180
00181
00182
00183
00184 void detach();
00185
00186 private:
00187 #ifndef DO_NOT_DOCUMENT
00188 template <class KeyP, class TP> class MapPrivate;
00189 MapPrivate<Key, T> *d;
00190 #endif
00191 };
00192
00193 }
00194
00195
00196
00197
00198 #include "tmap.tcc"
00199
00200 #endif