
Extension of the STL map. More...
#include </builds/gaudi/Gaudi/GaudiKernel/include/GaudiKernel/Map.h>


Public Types | |
| 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 const value_type & | const_reference |
| typedef map_type::size_type | size_type |
| typedef map_type::iterator | iterator |
| typedef map_type::const_iterator | const_iterator |
Public Member Functions | |
| Map ()=default | |
| Map (const map_type &other) | |
| Constructor from a standard map. | |
| template<typename In> | |
| Map (In &&first, In &&last) | |
| Construct from a subset. | |
| virtual | ~Map ()=default |
| Virtual destructor. You can inherit from this map type. | |
| iterator | begin () |
| iterator | end () |
| const_iterator | begin () const |
| const_iterator | end () const |
| mapped_type & | operator[] (const key_type &key) |
| 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 |
| template<class... Args> | |
| std::pair< iterator, bool > | emplace (Args &&... args) |
| template<typename ValueType> | |
| std::pair< iterator, bool > | insert (ValueType &&val) |
| std::pair< iterator, bool > | insert (value_type &&val) |
| template<typename In> | |
| void | insert (In &&first, In &&last) |
| template<typename ValueType> | |
| iterator | insert (iterator, ValueType &&val) |
| iterator | erase (const_iterator pos) |
| size_type | erase (const key_type &key) |
| iterator | erase (const_iterator first, const_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. | |
| const mapped_type & | operator[] (const key_type &key) const |
| Access elements of a const Map. | |
| const result_type & | at (const argument_type &key) const |
| checked access to the map | |
| Map & | merge (const map_type &other) |
| Merge two maps. | |
| Map & | merge (const Map &other) |
| Merge two maps. | |
| template<class K1, class K2, class K3> | |
| Map & | merge (const Map< K1, K2, K3 > &other) |
| Merge two maps. | |
| void | update (const key_type &key, const mapped_type &mapped) |
| operator map_type & () | |
| Allows to use the Map wherever an std::map is explicitly requested. | |
| operator const map_type & () const | |
| const key_type & | key_at (const size_type index) const |
| useful method for python decoration: | |
| const mapped_type & | value_at (const size_type index) const |
| useful method for python decoration: | |
Public Member Functions inherited from Gaudi::Utils::MapBase | |
| virtual | ~MapBase () |
Protected Attributes | |
| map_type | m_map |
Static Protected Attributes | |
| static const result_type | s_null_value |
Friends | |
| std::ostream & | operator<< (std::ostream &s, const GaudiUtils::Map< K, T, M > &m) |
| Serialize a GaudiUtils::Map in a python like format. E.g. "{a: 1, b: 2}". | |
Additional Inherited Members | |
Protected Member Functions inherited from Gaudi::Utils::MapBase | |
| void | throw_out_of_range_exception () const |
| throw std::out_of_range exception | |
Extension of the STL map.
Provides const accessors and can be extended by inheritance.
Due to helper base class Gaudi::Utils::MapBase, this class is "python-friendly", and one can perform all python manipulaitons in intuitive way:
In a similar way getitem and delitem methods can be redefined.
HashMap to avodi the compilation problems| typedef K GaudiUtils::Map< K, T, M >::argument_type |
| typedef map_type::const_iterator GaudiUtils::Map< K, T, M >::const_iterator |
| typedef const value_type& GaudiUtils::Map< K, T, M >::const_reference |
| typedef map_type::iterator GaudiUtils::Map< K, T, M >::iterator |
| typedef K GaudiUtils::Map< K, T, M >::key_type |
| typedef M GaudiUtils::Map< K, T, M >::map_type |
| typedef T GaudiUtils::Map< K, T, M >::mapped_type |
| typedef T GaudiUtils::Map< K, T, M >::result_type |
| typedef map_type::size_type GaudiUtils::Map< K, T, M >::size_type |
| typedef std::pair<const K, T> GaudiUtils::Map< K, T, M >::value_type |
|
default |
|
inline |
|
inline |
|
virtualdefault |
Virtual destructor. You can inherit from this map type.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
useful method for python decoration:
| index | (INPUT) the index |
| std::out_of_range | for invalid index |
Definition at line 268 of file Map.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Allow to use Map as an unary function.
There is no automatic extension of the map for missing keys!
| key | the key |
return the default value if not present
Definition at line 205 of file Map.h.
|
inline |
|
inline |
Access elements of a const Map.
There is no automatic extension of the map for missing keys!
| key | the key |
Definition at line 233 of file Map.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
useful method for python decoration:
| index | (INPUT) the index |
| std::out_of_range | for invalid index |
|
friend |
Serialize a GaudiUtils::Map in a python like format. E.g. "{a: 1, b: 2}".
|
protected |
|
staticprotected |