TagLib::Map< Key, T > Class Template Reference
A generic, implicitly shared map.
More...
#include <tmap.h>
List of all members.
Detailed Description
template<class Key, class T>
class TagLib::Map< Key, T >
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.
Constructor & Destructor Documentation
|
Make a shallow, implicitly shared, copy of m. Because this is implicitly shared, this method is lightweight and suitable for pass-by-value usage. |
template<class Key, class T> |
virtual TagLib::Map< Key, T >::~Map |
( |
|
) |
[virtual] |
|
|
Destroys this instance of the Map. |
Member Function Documentation
template<class Key, class T> |
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. |
template<class Key, class T> |
Iterator TagLib::Map< Key, T >::begin |
( |
|
) |
|
|
|
Returns an STL style iterator to the beginning of the map. See std::map::iterator for the semantics. |
template<class Key, class T> |
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. |
template<class Key, class T> |
bool TagLib::Map< Key, T >::contains |
( |
const Key & |
key |
) |
const |
|
|
Returns true if the map contains an instance of key. |
template<class Key, class T> |
void TagLib::Map< Key, T >::detach |
( |
|
) |
[protected] |
|
template<class Key, class T> |
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. |
template<class Key, class T> |
Iterator TagLib::Map< Key, T >::end |
( |
|
) |
|
|
|
Returns an STL style iterator to the end of the map. See std::map::iterator for the semantics. |
template<class Key, class T> |
Map<Key, T>& TagLib::Map< Key, T >::erase |
( |
const Key & |
key |
) |
|
|
|
Erase the item with key from the list. |
template<class Key, class T> |
Map<Key, T>& TagLib::Map< Key, T >::erase |
( |
Iterator |
it |
) |
|
|
|
Erase the item at it from the list. |
template<class Key, class T> |
ConstIterator TagLib::Map< Key, T >::find |
( |
const Key & |
key |
) |
const |
|
|
Find the first occurrence of key. |
template<class Key, class T> |
Iterator TagLib::Map< Key, T >::find |
( |
const Key & |
key |
) |
|
|
|
Find the first occurrence of key. |
template<class Key, class T> |
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. |
template<class Key, class T> |
bool TagLib::Map< Key, T >::isEmpty |
( |
|
) |
const |
|
|
Returns true if the map is empty.
- See also:
- size()
|
template<class Key, class T> |
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. |
template<class Key, class T> |
T& TagLib::Map< Key, T >::operator[] |
( |
const Key & |
key |
) |
|
|
|
Returns a reference to the value associated with key.
- Note:
- This has undefined behavior if the key is not present in the map.
|
template<class Key, class T> |
const T& TagLib::Map< Key, T >::operator[] |
( |
const Key & |
key |
) |
const |
|
|
Returns a reference to the value associated with key.
- Note:
- This has undefined behavior if the key is not present in the map.
|
|
The number of elements in the map.
- See also:
- isEmpty()
|
The documentation for this class was generated from the following file: