![]() |
|
#include <tmap.h>
Public Member Functions | |
Map () | |
Map (const Map< Key, T > &m) | |
virtual | ~Map () |
Iterator | begin () |
ConstIterator | begin () const |
Iterator | end () |
ConstIterator | end () const |
Map< Key, T > & | insert (const Key &key, const T &value) |
Map< Key, T > & | clear () |
uint | size () const |
bool | isEmpty () const |
Iterator | find (const Key &key) |
ConstIterator | find (const Key &key) const |
bool | contains (const Key &key) const |
Map< Key, T > & | erase (Iterator it) |
Map< Key, T > & | erase (const Key &key) |
const T & | operator[] (const Key &key) const |
T & | operator[] (const Key &key) |
Map< Key, T > & | operator= (const Map< Key, T > &m) |
Protected Member Functions | |
void | detach () |
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.
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 TagLib::Map< Key, T >::~Map | ( | ) | [virtual] |
Destroys this instance of the Map.
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.
Iterator TagLib::Map< Key, T >::begin | ( | ) |
Returns an STL style iterator to the beginning of the map. See std::map::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.
void TagLib::Map< Key, T >::detach | ( | ) | [protected] |
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.
Iterator TagLib::Map< Key, T >::end | ( | ) |
Returns an STL style iterator to the end of the map. See std::map::iterator for the semantics.
Map<Key, T>& TagLib::Map< Key, T >::erase | ( | const Key & | key | ) |
Erase the item with key from the list.
Map<Key, T>& TagLib::Map< Key, T >::erase | ( | Iterator | it | ) |
Erase the item at it from the list.
ConstIterator TagLib::Map< Key, T >::find | ( | const Key & | key | ) | const |
Find the first occurrence of key.
Iterator TagLib::Map< Key, T >::find | ( | const Key & | key | ) |
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 |
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.
T& TagLib::Map< Key, T >::operator[] | ( | const Key & | key | ) |
Returns a reference to the value associated with key.
const T& TagLib::Map< Key, T >::operator[] | ( | const Key & | key | ) | const |
Returns a reference to the value associated with key.
uint TagLib::Map< Key, T >::size | ( | ) | const |