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
00031 #include "taglib.h"
00032
00033 namespace TagLib {
00034
00036
00043 template <class Key, class T> class Map
00044 {
00045 public:
00046 #ifndef DO_NOT_DOCUMENT
00047 #ifdef WANT_CLASS_INSTANTIATION_OF_MAP
00048
00049
00050
00051
00052
00053
00054
00055
00056 typedef typename std::map<class Key, class T>::iterator Iterator;
00057 typedef typename std::map<class Key, class T>::const_iterator ConstIterator;
00058 #else
00059 typedef typename std::map<Key, T>::iterator Iterator;
00060 typedef typename std::map<Key, T>::const_iterator ConstIterator;
00061 #endif
00062 #endif
00063
00067 Map();
00068
00074 Map(const Map<Key, T> &m);
00075
00079 virtual ~Map();
00080
00085 Iterator begin();
00086
00091 ConstIterator begin() const;
00092
00097 Iterator end();
00098
00103 ConstIterator end() const;
00104
00109 Map<Key, T> &insert(const Key &key, const T &value);
00110
00115 Map<Key, T> &clear();
00116
00122 unsigned int size() const;
00123
00129 bool isEmpty() const;
00130
00134 Iterator find(const Key &key);
00135
00139 ConstIterator find(const Key &key) const;
00140
00144 bool contains(const Key &key) const;
00145
00149 Map<Key, T> &erase(Iterator it);
00150
00154 Map<Key, T> &erase(const Key &key);
00155
00161 const T &operator[](const Key &key) const;
00162
00168 T &operator[](const Key &key);
00169
00175 Map<Key, T> &operator=(const Map<Key, T> &m);
00176
00177 protected:
00178
00179
00180
00181
00182
00183 void detach();
00184
00185 private:
00186 #ifndef DO_NOT_DOCUMENT
00187 template <class KeyP, class TP> class MapPrivate;
00188 MapPrivate<Key, T> *d;
00189 #endif
00190 };
00191
00192 }
00193
00194
00195
00196
00197 #include "tmap.tcc"
00198
00199 #endif