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 #ifndef TAGLIB_MAP_H
00023 #define TAGLIB_MAP_H
00024
00025 #include "taglib.h"
00026
00027 #include <map>
00028
00029 namespace TagLib {
00030
00032
00039 template <class Key, class T> class Map
00040 {
00041 public:
00042 #ifndef DO_NOT_DOCUMENT
00043 typedef typename std::map<Key, T>::iterator Iterator;
00044 typedef typename std::map<Key, T>::const_iterator ConstIterator;
00045 #endif
00046
00050 Map();
00051
00057 Map(const Map<Key, T> &m);
00058
00062 virtual ~Map();
00063
00068 Iterator begin();
00069
00074 ConstIterator begin() const;
00075
00080 Iterator end();
00081
00086 ConstIterator end() const;
00087
00092 void insert(const Key &key, const T &value);
00093
00098 void clear();
00099
00105 uint size() const;
00106
00112 bool isEmpty() const;
00113
00117 Iterator find(const Key &key);
00118
00122 ConstIterator find(const Key &key) const;
00123
00127 bool contains(const Key &key) const;
00128
00132 void erase(Iterator it);
00133
00139 const T &operator[](const Key &key) const;
00140
00146 T &operator[](const Key &key);
00147
00153 Map<Key, T> &operator=(const Map<Key, T> &m);
00154
00155 protected:
00156
00157
00158
00159
00160
00161 void detach();
00162
00163 private:
00164 #ifndef DO_NOT_DOCUMENT
00165 template <class KeyP, class TP> class MapPrivate;
00166 MapPrivate<Key, T> *d;
00167 #endif
00168 };
00169
00170 }
00171
00172
00173
00174
00175 #include "tmap.tcc"
00176
00177 #endif