#include <GaudiKernel/HashMap.h>
Inheritance diagram for GaudiUtils::HashMap< K, T, H, M >:
Public Types | |
typedef H | hasher |
typedef M | map_type |
typedef K | key_type |
typedef T | mapped_type |
typedef K | argument_type |
typedef T | result_type |
typedef std::pair< const K, T > | value_type |
typedef map_type::size_type | size_type |
typedef map_type::iterator | iterator |
typedef map_type::const_iterator | const_iterator |
Public Member Functions | |
hasher | hash_funct () const |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
mapped_type & | operator[] (const key_type &key) |
const mapped_type & | operator[] (const key_type &key) const |
Access elements of a const Map. | |
iterator | find (const key_type &key) |
const_iterator | find (const key_type &key) const |
size_type | count (const key_type &key) const |
iterator | lower_bound (const key_type &key) |
const_iterator | lower_bound (const key_type &key) const |
iterator | upper_bound (const key_type &key) |
const_iterator | upper_bound (const key_type &key) const |
std::pair< iterator, iterator > | equal_range (const key_type &key) |
std::pair< const_iterator, const_iterator > | equal_range (const key_type &key) const |
std::pair< iterator, bool > | insert (const value_type &val) |
iterator | insert (iterator pos, const value_type &val) |
template<typename In> | |
void | insert (In first, In last) |
void | erase (iterator pos) |
size_type | erase (const key_type &key) |
void | erase (iterator first, iterator last) |
void | clear () |
size_type | size () const |
size_type | max_size () const |
bool | empty () const |
void | swap (map_type &other) |
const result_type & | operator() (const argument_type &key) const |
Allow to use Map as an unary function. | |
Map & | merge (const map_type &other) |
Merge two maps. | |
operator map_type & () | |
Allows to use the Map wherever an std::map is explicitly requested. | |
operator const map_type & () const | |
Protected Attributes | |
map_type | m_map |
Static Protected Attributes | |
static const result_type | s_null_value = typename Map<K,T,M>::result_type() |
Definition at line 48 of file HashMap.h.
typedef H GaudiUtils::HashMap< K, T, H, M >::hasher |
typedef M GaudiUtils::Map< K, T, M >::map_type [inherited] |
typedef K GaudiUtils::Map< K, T, M >::key_type [inherited] |
typedef T GaudiUtils::Map< K, T, M >::mapped_type [inherited] |
typedef K GaudiUtils::Map< K, T, M >::argument_type [inherited] |
typedef T GaudiUtils::Map< K, T, M >::result_type [inherited] |
typedef std::pair<const K,T> GaudiUtils::Map< K, T, M >::value_type [inherited] |
typedef map_type::size_type GaudiUtils::Map< K, T, M >::size_type [inherited] |
typedef map_type::iterator GaudiUtils::Map< K, T, M >::iterator [inherited] |
typedef map_type::const_iterator GaudiUtils::Map< K, T, M >::const_iterator [inherited] |
hasher GaudiUtils::HashMap< K, T, H, M >::hash_funct | ( | ) | const [inline] |
Definition at line 53 of file HashMap.h.
00053 { 00054 // Marco Cl.: since on windows we are using a std::map, we have to provide a different implementation 00055 // for GaudiUtils::HashMap::hash_funct(). (std::map::hash_funct does not exist) 00056 #ifdef _WIN32 00057 return hasher(); 00058 #else 00059 return this->m_map.hash_funct(); 00060 #endif 00061 }
iterator GaudiUtils::Map< K, T, M >::begin | ( | ) | [inline, inherited] |
const_iterator GaudiUtils::Map< K, T, M >::begin | ( | ) | const [inline, inherited] |
iterator GaudiUtils::Map< K, T, M >::end | ( | ) | [inline, inherited] |
const_iterator GaudiUtils::Map< K, T, M >::end | ( | ) | const [inline, inherited] |
mapped_type& GaudiUtils::Map< K, T, M >::operator[] | ( | const key_type & | key | ) | [inline, inherited] |
const mapped_type& GaudiUtils::Map< K, T, M >::operator[] | ( | const key_type & | key | ) | const [inline, inherited] |
Access elements of a const Map.
There is no automatic extension of the map for missing keys!
const GaudiUtils::Map<KEY,VALUE> m = ... ; // OK: KEY key = ... ; std::cout << " Value: " << m[key] << std::end ; // it is OK! // ERROR: VALUE value = ... ; m[key] = value ; // ERROR!
key | the key |
Definition at line 185 of file Map.h.
iterator GaudiUtils::Map< K, T, M >::find | ( | const key_type & | key | ) | [inline, inherited] |
const_iterator GaudiUtils::Map< K, T, M >::find | ( | const key_type & | key | ) | const [inline, inherited] |
size_type GaudiUtils::Map< K, T, M >::count | ( | const key_type & | key | ) | const [inline, inherited] |
iterator GaudiUtils::Map< K, T, M >::lower_bound | ( | const key_type & | key | ) | [inline, inherited] |
const_iterator GaudiUtils::Map< K, T, M >::lower_bound | ( | const key_type & | key | ) | const [inline, inherited] |
iterator GaudiUtils::Map< K, T, M >::upper_bound | ( | const key_type & | key | ) | [inline, inherited] |
const_iterator GaudiUtils::Map< K, T, M >::upper_bound | ( | const key_type & | key | ) | const [inline, inherited] |
std::pair<iterator,iterator> GaudiUtils::Map< K, T, M >::equal_range | ( | const key_type & | key | ) | [inline, inherited] |
std::pair<const_iterator,const_iterator> GaudiUtils::Map< K, T, M >::equal_range | ( | const key_type & | key | ) | const [inline, inherited] |
std::pair<iterator,bool> GaudiUtils::Map< K, T, M >::insert | ( | const value_type & | val | ) | [inline, inherited] |
iterator GaudiUtils::Map< K, T, M >::insert | ( | iterator | pos, | |
const value_type & | val | |||
) | [inline, inherited] |
void GaudiUtils::Map< K, T, M >::insert | ( | In | first, | |
In | last | |||
) | [inline, inherited] |
void GaudiUtils::Map< K, T, M >::erase | ( | iterator | pos | ) | [inline, inherited] |
size_type GaudiUtils::Map< K, T, M >::erase | ( | const key_type & | key | ) | [inline, inherited] |
void GaudiUtils::Map< K, T, M >::erase | ( | iterator | first, | |
iterator | last | |||
) | [inline, inherited] |
void GaudiUtils::Map< K, T, M >::clear | ( | ) | [inline, inherited] |
size_type GaudiUtils::Map< K, T, M >::size | ( | ) | const [inline, inherited] |
size_type GaudiUtils::Map< K, T, M >::max_size | ( | ) | const [inline, inherited] |
bool GaudiUtils::Map< K, T, M >::empty | ( | ) | const [inline, inherited] |
void GaudiUtils::Map< K, T, M >::swap | ( | map_type & | other | ) | [inline, inherited] |
const result_type& GaudiUtils::Map< K, T, M >::operator() | ( | const argument_type & | key | ) | const [inline, inherited] |
Allow to use Map as an unary function.
There is no automatic extension of the map for missing keys!
const GaudiUtils::Map<KEY,VALUE> m = ... ; // OK: KEY key = ... ; std::cout << " Value: " << m(key) << std::end ; // it is OK! // ERROR: VALUE value = ... ; m(key) = value ; // ERROR!
key | the key |
< return the default value
Definition at line 154 of file Map.h.
00155 { 00156 // static const result_type s_null_value; 00157 const_iterator it = m_map.find(key); 00158 if ( it != m_map.end() ) { return it->second ; } 00159 // return the default value 00160 return s_null_value; 00161 }
Map& GaudiUtils::Map< K, T, M >::merge | ( | const map_type & | other | ) | [inline, inherited] |
GaudiUtils::Map< K, T, M >::operator map_type & | ( | ) | [inline, inherited] |
GaudiUtils::Map< K, T, M >::operator const map_type & | ( | ) | const [inline, inherited] |
map_type GaudiUtils::Map< K, T, M >::m_map [protected, inherited] |
const Map< K, T, M >::result_type GaudiUtils::Map< K, T, M >::s_null_value = typename Map<K,T,M>::result_type() [static, protected, inherited] |