Go to the documentation of this file.
81 template <
typename K,
typename T,
typename M = std::map<K, T>>
111 template <
typename In>
112 Map( In&& first, In&& last ) :
m_map(
std::forward<In>( first ),
std::forward<In>( last ) ) {}
149 template <
class... Args>
151 return m_map.emplace( std::forward<Args>(
args )... );
153 template <
typename ValueType>
154 inline std::pair<iterator, bool>
insert( ValueType&& val ) {
155 return m_map.insert( std::forward<ValueType>( val ) );
158 return m_map.insert( std::forward<value_type>( val ) );
160 template <
typename In>
161 inline void insert( In&& first, In&& last ) {
162 m_map.insert( std::forward<In>( first ), std::forward<In>( last ) );
164 template <
typename ValueType>
166 return m_map.insert( std::forward<ValueType>( val ) ).first;
250 template <
class K1,
class K2,
class K3>
269 return std::next( this->
begin(), index )->first;
278 return std::next( this->
begin(), index )->second;
281 template <
typename K,
typename T,
typename M>
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:
AttribStringParser::Iterator begin(const AttribStringParser &parser)
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)
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...