neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neolib::map< Key, T, Pr, Alloc > Class Template Reference

#include <map.hpp>

Inheritance diagram for neolib::map< Key, T, Pr, Alloc >:
neolib::reference_counted< i_map< abstract_t< Key >, abstract_t< T > > > neolib::i_map< abstract_t< Key >, abstract_t< T > > neolib::i_container< T, ConstIteratorType, IteratorType > neolib::i_reference_counted

Public Types

typedef i_map< abstract_t< Key >, abstract_t< T > > abstract_type
 
typedef Key key_type
 
typedef T mapped_type
 
typedef pair< const key_type, mapped_typevalue_type
 
typedef abstract_t< key_typeabstract_key_type
 
typedef abstract_t< mapped_typeabstract_mapped_type
 
typedef i_pair< const abstract_key_type, abstract_mapped_typeabstract_value_type
 
typedef Pr key_compare
 
typedef Alloc allocator_type
 
typedef std::map< key_type, value_type, key_compare, typename std::allocator_traits< allocator_type >::template rebind_alloc< std::pair< const key_type, value_type > > > std_type
 
typedef std_type::value_type container_value_type
 
- Public Types inherited from neolib::i_map< abstract_t< Key >, abstract_t< T > >
typedef self_type abstract_type
 
typedef abstract_t< Key > abstract_key_type
 
typedef abstract_t< T > abstract_mapped_type
 
typedef i_pair< const abstract_key_type, abstract_mapped_typeabstract_value_type
 
typedef base_type::const_iterator const_iterator
 
typedef base_type::iterator iterator
 
- Public Types inherited from neolib::i_container< T, ConstIteratorType, IteratorType >
typedef T value_type
 
typedef size_t size_type
 
typedef ConstIteratorType abstract_const_iterator
 
typedef IteratorType abstract_iterator
 
typedef abstract_const_iterator::iterator_wrapper const_iterator
 
typedef abstract_iterator::iterator_wrapper iterator
 
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
 
typedef std::reverse_iterator< iteratorreverse_iterator
 

Public Member Functions

 map ()
 
 map (const map &aOther)
 
 map (map &&aOther)
 
 map (const std::initializer_list< value_type > &aIlist)
 
 map (const generic_container_type &aOther)
 
template<typename InputIter >
 map (InputIter aFirst, InputIter aLast)
 
mapoperator= (const map &aOther)
 
mapoperator= (map &&aOther)
 
const std_typeas_std_map () const
 
std_typeas_std_map ()
 
std_type to_std_map () const
 
constexpr bool operator== (const self_type &that) const noexcept
 
constexpr std::partial_ordering operator<=> (const self_type &that) const noexcept
 
size_type size () const noexcept final
 
size_type max_size () const noexcept final
 
void clear () final
 
void assign (const generic_container_type &aOther) final
 
abstract_mapped_typeoperator[] (const abstract_key_type &aKey) final
 
const abstract_mapped_typeat (const abstract_key_type &aKey) const final
 
abstract_mapped_typeat (const abstract_key_type &aKey) final
 
template<typename Key2 , typename... Args>
value_typeemplace (Key2 &&aKey, Args &&... aArgs)
 
- Public Member Functions inherited from neolib::reference_counted< i_map< abstract_t< Key >, abstract_t< T > > >
 reference_counted () noexcept
 
 reference_counted (const reference_counted &aOther) noexcept
 
 ~reference_counted ()
 
reference_countedoperator= (const reference_counted &)
 
void add_ref () const noexcept override
 
void release () const override
 
int32_t use_count () const noexcept override
 
const base_typerelease_and_take_ownership () const override
 
base_typerelease_and_take_ownership () override
 
void pin () const noexcept override
 
void unpin () const override
 
i_ref_control_blockcontrol_block () override
 
- Public Member Functions inherited from neolib::i_map< abstract_t< Key >, abstract_t< T > >
virtual abstract_mapped_typeoperator[] (const abstract_key_type &aKey)=0
 
virtual const abstract_mapped_typeat (const abstract_key_type &aKey) const=0
 
virtual abstract_mapped_typeat (const abstract_key_type &aKey)=0
 
iterator insert (const abstract_value_type &aValue)
 
iterator insert (const abstract_key_type &aKey, const abstract_mapped_type &aMapped)
 
const_iterator find (const abstract_key_type &aKey) const
 
iterator find (const abstract_key_type &aKey)
 
const_iterator lower_bound (const abstract_key_type &aKey) const
 
iterator lower_bound (const abstract_key_type &aKey)
 
const_iterator upper_bound (const abstract_key_type &aKey) const
 
iterator upper_bound (const abstract_key_type &aKey)
 
- Public Member Functions inherited from neolib::i_container< T, ConstIteratorType, IteratorType >
bool empty () const noexcept
 
const_iterator cbegin () const
 
const_iterator begin () const
 
iterator begin ()
 
const_iterator cend () const
 
const_iterator end () const
 
iterator end ()
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator rbegin () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator crend () const
 
const_reverse_iterator rend () const
 
reverse_iterator rend ()
 
iterator erase (const abstract_iterator &aPosition)
 
iterator erase (const abstract_const_iterator &aPosition)
 
iterator erase (const abstract_iterator &aFirst, const abstract_iterator &aLast)
 
iterator erase (const abstract_const_iterator &aFirst, const abstract_const_iterator &aLast)
 
i_containeroperator= (const i_container &aRhs)
 
- Public Member Functions inherited from neolib::i_reference_counted
virtual ~i_reference_counted ()=default
 

Protected Types

typedef container::const_iterator< value_type, typename std_type::const_iterator > container_const_iterator
 
typedef container::iterator< value_type, typename std_type::iterator, typename std_type::const_iterator > container_iterator
 
typedef abstract_type::abstract_const_iterator abstract_const_iterator
 
typedef abstract_type::abstract_iterator abstract_iterator
 
- Protected Types inherited from neolib::i_map< abstract_t< Key >, abstract_t< T > >
typedef base_type::abstract_const_iterator abstract_const_iterator
 
typedef base_type::abstract_iterator abstract_iterator
 
- Protected Types inherited from neolib::i_container< T, ConstIteratorType, IteratorType >
typedef i_container< T, ConstIteratorType, IteratorTypegeneric_container_type
 

Detailed Description

template<typename Key, typename T, typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
class neolib::map< Key, T, Pr, Alloc >

Definition at line 47 of file map.hpp.

Member Typedef Documentation

◆ abstract_const_iterator

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
typedef abstract_type::abstract_const_iterator neolib::map< Key, T, Pr, Alloc >::abstract_const_iterator
protected

Definition at line 72 of file map.hpp.

◆ abstract_iterator

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
typedef abstract_type::abstract_iterator neolib::map< Key, T, Pr, Alloc >::abstract_iterator
protected

Definition at line 73 of file map.hpp.

◆ abstract_key_type

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
typedef abstract_t<key_type> neolib::map< Key, T, Pr, Alloc >::abstract_key_type

Definition at line 57 of file map.hpp.

◆ abstract_mapped_type

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
typedef abstract_t<mapped_type> neolib::map< Key, T, Pr, Alloc >::abstract_mapped_type

Definition at line 58 of file map.hpp.

◆ abstract_type

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
typedef i_map<abstract_t<Key>, abstract_t<T> > neolib::map< Key, T, Pr, Alloc >::abstract_type

Definition at line 53 of file map.hpp.

◆ abstract_value_type

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
typedef i_pair<const abstract_key_type, abstract_mapped_type> neolib::map< Key, T, Pr, Alloc >::abstract_value_type

Definition at line 59 of file map.hpp.

◆ allocator_type

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
typedef Alloc neolib::map< Key, T, Pr, Alloc >::allocator_type

Definition at line 61 of file map.hpp.

◆ container_const_iterator

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
typedef container::const_iterator<value_type, typename std_type::const_iterator> neolib::map< Key, T, Pr, Alloc >::container_const_iterator
protected

Definition at line 70 of file map.hpp.

◆ container_iterator

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
typedef container::iterator<value_type, typename std_type::iterator, typename std_type::const_iterator> neolib::map< Key, T, Pr, Alloc >::container_iterator
protected

Definition at line 71 of file map.hpp.

◆ container_value_type

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
typedef std_type::value_type neolib::map< Key, T, Pr, Alloc >::container_value_type

Definition at line 63 of file map.hpp.

◆ key_compare

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
typedef Pr neolib::map< Key, T, Pr, Alloc >::key_compare

Definition at line 60 of file map.hpp.

◆ key_type

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
typedef Key neolib::map< Key, T, Pr, Alloc >::key_type

Definition at line 54 of file map.hpp.

◆ mapped_type

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
typedef T neolib::map< Key, T, Pr, Alloc >::mapped_type

Definition at line 55 of file map.hpp.

◆ std_type

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
typedef std::map<key_type, value_type, key_compare, typename std::allocator_traits<allocator_type>::template rebind_alloc<std::pair<const key_type, value_type> > > neolib::map< Key, T, Pr, Alloc >::std_type

Definition at line 62 of file map.hpp.

◆ value_type

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
typedef pair<const key_type, mapped_type> neolib::map< Key, T, Pr, Alloc >::value_type

Definition at line 56 of file map.hpp.

Constructor & Destructor Documentation

◆ map() [1/6]

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
neolib::map< Key, T, Pr, Alloc >::map ( )
inline

Definition at line 76 of file map.hpp.

◆ map() [2/6]

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
neolib::map< Key, T, Pr, Alloc >::map ( const map< Key, T, Pr, Alloc > &  aOther)
inline

Definition at line 79 of file map.hpp.

◆ map() [3/6]

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
neolib::map< Key, T, Pr, Alloc >::map ( map< Key, T, Pr, Alloc > &&  aOther)
inline

Definition at line 83 of file map.hpp.

◆ map() [4/6]

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
neolib::map< Key, T, Pr, Alloc >::map ( const std::initializer_list< value_type > &  aIlist)
inline

Definition at line 87 of file map.hpp.

◆ map() [5/6]

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
neolib::map< Key, T, Pr, Alloc >::map ( const generic_container_type aOther)
inline

Definition at line 92 of file map.hpp.

◆ map() [6/6]

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
template<typename InputIter >
neolib::map< Key, T, Pr, Alloc >::map ( InputIter  aFirst,
InputIter  aLast 
)
inline

Definition at line 97 of file map.hpp.

Member Function Documentation

◆ as_std_map() [1/2]

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
std_type & neolib::map< Key, T, Pr, Alloc >::as_std_map ( )
inline

Definition at line 115 of file map.hpp.

◆ as_std_map() [2/2]

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
const std_type & neolib::map< Key, T, Pr, Alloc >::as_std_map ( ) const
inline

Definition at line 114 of file map.hpp.

◆ assign()

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
void neolib::map< Key, T, Pr, Alloc >::assign ( const generic_container_type aOther)
inlinefinalvirtual

◆ at() [1/2]

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
const abstract_mapped_type & neolib::map< Key, T, Pr, Alloc >::at ( const abstract_key_type aKey) const
inlinefinal

Definition at line 169 of file map.hpp.

◆ at() [2/2]

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
abstract_mapped_type & neolib::map< Key, T, Pr, Alloc >::at ( const abstract_key_type aKey)
inlinefinal

Definition at line 173 of file map.hpp.

◆ clear()

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
void neolib::map< Key, T, Pr, Alloc >::clear ( )
inlinefinalvirtual

◆ emplace()

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
template<typename Key2 , typename... Args>
value_type & neolib::map< Key, T, Pr, Alloc >::emplace ( Key2 &&  aKey,
Args &&...  aArgs 
)
inline

Definition at line 180 of file map.hpp.

◆ max_size()

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
size_type neolib::map< Key, T, Pr, Alloc >::max_size ( ) const
inlinefinalvirtualnoexcept

◆ operator<=>()

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
constexpr std::partial_ordering neolib::map< Key, T, Pr, Alloc >::operator<=> ( const self_type &  that) const
inlineconstexprnoexcept

Definition at line 123 of file map.hpp.

◆ operator=() [1/2]

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
map & neolib::map< Key, T, Pr, Alloc >::operator= ( const map< Key, T, Pr, Alloc > &  aOther)
inline

Definition at line 102 of file map.hpp.

◆ operator=() [2/2]

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
map & neolib::map< Key, T, Pr, Alloc >::operator= ( map< Key, T, Pr, Alloc > &&  aOther)
inline

Definition at line 107 of file map.hpp.

◆ operator==()

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
constexpr bool neolib::map< Key, T, Pr, Alloc >::operator== ( const self_type &  that) const
inlineconstexprnoexcept

Definition at line 119 of file map.hpp.

◆ operator[]()

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
abstract_mapped_type & neolib::map< Key, T, Pr, Alloc >::operator[] ( const abstract_key_type aKey)
inlinefinal

Definition at line 155 of file map.hpp.

◆ size()

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
size_type neolib::map< Key, T, Pr, Alloc >::size ( ) const
inlinefinalvirtualnoexcept

◆ to_std_map()

template<typename Key , typename T , typename Pr = std::less<Key>, typename Alloc = std::allocator<std::pair<const Key, T>>>
std_type neolib::map< Key, T, Pr, Alloc >::to_std_map ( ) const
inline

Definition at line 116 of file map.hpp.


The documentation for this class was generated from the following file: