Go to the documentation of this file.
11 #ifndef GAUDIKERNEL_MAP_H
12 #define GAUDIKERNEL_MAP_H 1
90 template <
typename K,
typename T,
typename M = std::map<K, T>>
129 template <
typename In>
130 Map( In&& first, In&& last ) :
m_map(
std::forward<In>( first ),
std::forward<In>( last ) ) {}
173 template <
class... Args>
175 return m_map.emplace( std::forward<Args>(
args )... );
177 template <
typename ValueType>
179 return m_map.insert( std::forward<ValueType>( val ) );
182 return m_map.insert( std::forward<value_type>( val ) );
184 template <
typename In>
185 inline void insert( In&& first, In&& last ) {
186 m_map.insert( std::forward<In>( first ), std::forward<In>( last ) );
188 template <
typename ValueType>
190 return m_map.insert( std::forward<ValueType>( val ) ).first;
277 template <
class K1,
class K2,
class K3>
314 template <
typename K,
typename T,
typename M>
323 #endif // GAUDIKERNEL_MAP_H
size_type erase(const key_type &key)
iterator find(const key_type &key)
iterator upper_bound(const key_type &key)
Map(const map_type &other)
Constructor from a standard map.
size_type count(const key_type &key) const
const_iterator upper_bound(const key_type &key) const
std::pair< iterator, bool > insert(value_type &&val)
iterator insert(iterator, ValueType &&val)
void swap(map_type &other)
const_iterator begin() const
const result_type & operator()(const argument_type &key) const
Allow to use Map as an unary function.
const mapped_type & value_at(const size_type index) const
useful method for python decoration:
const mapped_type & operator[](const key_type &key) const
Access elements of a const Map.
map_type::const_iterator const_iterator
Map & merge(const Map &other)
Merge two maps.
iterator erase(const_iterator first, const_iterator last)
const key_type & key_at(const size_type index) const
useful method for python decoration:
const_iterator lower_bound(const key_type &key) const
Map & merge(const map_type &other)
Merge two maps.
Map & merge(const Map< K1, K2, K3 > &other)
Merge two maps.
std::pair< const K, T > value_type
void insert(In &&first, In &&last)
Map()=default
Standard constructor.
iterator lower_bound(const key_type &key)
const result_type & at(const argument_type &key) const
checked access to the map
const value_type & const_reference
const_iterator find(const key_type &key) const
Map(In &&first, In &&last)
Construct from a subset.
iterator erase(const_iterator pos)
std::pair< const_iterator, const_iterator > equal_range(const key_type &key) const
std::pair< iterator, iterator > equal_range(const key_type &key)
map_type::iterator iterator
const_iterator end() const
size_type max_size() const
std::pair< iterator, bool > insert(ValueType &&val)
mapped_type & operator[](const key_type &key)
void throw_out_of_range_exception() const
throw std::out_of_range exception
void update(const key_type &key, const mapped_type &mapped)
map_type::size_type size_type
virtual ~Map()=default
Virtual destructor. You can inherit from this map type.
static const result_type s_null_value
std::pair< iterator, bool > emplace(Args &&... args)
size_t index(const Gaudi::ParticleProperty *property, const Gaudi::Interfaces::IParticlePropertySvc *service)
helper utility for mapping of Gaudi::ParticleProperty object into non-negative integral sequential id...