![]() |
Miam-Player
0.8.0
A nice music player
|
A generic, implicitly shared map. More...
#include <tmap.h>
Public Types | |
typedef std::map< Key, T >::iterator | Iterator |
typedef std::map< Key, T >::const_iterator | ConstIterator |
Public Member Functions | |
Map () | |
Constructs an empty Map. More... | |
Map (const Map< Key, T > &m) | |
Make a shallow, implicitly shared, copy of m. More... | |
virtual | ~Map () |
Destroys this instance of the Map. More... | |
Iterator | begin () |
Returns an STL style iterator to the beginning of the map. More... | |
ConstIterator | begin () const |
Returns an STL style iterator to the beginning of the map. More... | |
Iterator | end () |
Returns an STL style iterator to the end of the map. More... | |
ConstIterator | end () const |
Returns an STL style iterator to the end of the map. More... | |
Map< Key, T > & | insert (const Key &key, const T &value) |
Inserts value under key in the map. More... | |
Map< Key, T > & | clear () |
Removes all of the elements from elements from the map. More... | |
unsigned int | size () const |
The number of elements in the map. More... | |
bool | isEmpty () const |
Returns true if the map is empty. More... | |
Iterator | find (const Key &key) |
Find the first occurrence of key. More... | |
ConstIterator | find (const Key &key) const |
Find the first occurrence of key. More... | |
bool | contains (const Key &key) const |
Returns true if the map contains an instance of key. More... | |
Map< Key, T > & | erase (Iterator it) |
Erase the item at it from the list. More... | |
Map< Key, T > & | erase (const Key &key) |
Erase the item with key from the list. More... | |
const T & | operator[] (const Key &key) const |
Returns a reference to the value associated with key. More... | |
T & | operator[] (const Key &key) |
Returns a reference to the value associated with key. More... | |
Map< Key, T > & | operator= (const Map< Key, T > &m) |
Make a shallow, implicitly shared, copy of m. More... | |
Protected Member Functions | |
void | detach () |
A generic, implicitly shared map.
This implements a standard map container that associates a key with a value and has fast key-based lookups. This map is also implicitly shared making it suitable for pass-by-value usage.
typedef std::map<Key, T>::const_iterator TagLib::Map< Key, T >::ConstIterator |
typedef std::map<Key, T>::iterator TagLib::Map< Key, T >::Iterator |
TagLib::Map< Key, T >::Map | ( | ) |
Constructs an empty Map.
TagLib::Map< Key, T >::Map | ( | const Map< Key, T > & | m | ) |
Make a shallow, implicitly shared, copy of m.
Because this is implicitly shared, this method is lightweight and suitable for pass-by-value usage.
|
virtual |
Destroys this instance of the Map.
Iterator TagLib::Map< Key, T >::begin | ( | ) |
Returns an STL style iterator to the beginning of the map.
See std::map::iterator for the semantics.
ConstIterator TagLib::Map< Key, T >::begin | ( | ) | const |
Returns an STL style iterator to the beginning of the map.
See std::map::const_iterator for the semantics.
Map<Key, T>& TagLib::Map< Key, T >::clear | ( | ) |
Removes all of the elements from elements from the map.
This however will not delete pointers if the mapped type is a pointer type.
bool TagLib::Map< Key, T >::contains | ( | const Key & | key | ) | const |
Returns true if the map contains an instance of key.
|
protected |
Iterator TagLib::Map< Key, T >::end | ( | ) |
Returns an STL style iterator to the end of the map.
See std::map::iterator for the semantics.
ConstIterator TagLib::Map< Key, T >::end | ( | ) | const |
Returns an STL style iterator to the end of the map.
See std::map::const_iterator for the semantics.
Map<Key, T>& TagLib::Map< Key, T >::erase | ( | Iterator | it | ) |
Erase the item at it from the list.
Map<Key, T>& TagLib::Map< Key, T >::erase | ( | const Key & | key | ) |
Erase the item with key from the list.
Iterator TagLib::Map< Key, T >::find | ( | const Key & | key | ) |
Find the first occurrence of key.
ConstIterator TagLib::Map< Key, T >::find | ( | const Key & | key | ) | const |
Find the first occurrence of key.
Map<Key, T>& TagLib::Map< Key, T >::insert | ( | const Key & | key, |
const T & | value | ||
) |
Inserts value under key in the map.
If a value for key already exists it will be overwritten.
bool TagLib::Map< Key, T >::isEmpty | ( | ) | const |
Returns true if the map is empty.
Map<Key, T>& TagLib::Map< Key, T >::operator= | ( | const Map< Key, T > & | m | ) |
Make a shallow, implicitly shared, copy of m.
Because this is implicitly shared, this method is lightweight and suitable for pass-by-value usage.
const T& TagLib::Map< Key, T >::operator[] | ( | const Key & | key | ) | const |
Returns a reference to the value associated with key.
T& TagLib::Map< Key, T >::operator[] | ( | const Key & | key | ) |
Returns a reference to the value associated with key.
unsigned int TagLib::Map< Key, T >::size | ( | ) | const |
The number of elements in the map.