C/C++ API Reference
Loading...
Searching...
No Matches

Overview

Classes

class  pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >
 
class  pw::containers::FlatMap< Key, Value, kArraySize >
 
class  pw::containers::FlatMap< Key, Value, kArraySize >::mapped_iterator
 
class  pw::IntrusiveMap< Key, T >
 
class  pw::IntrusiveMap< Key, T >::iterator
 
class  pw::IntrusiveMap< Key, T >::const_iterator
 
class  pw::IntrusiveMultiMap< Key, T >
 
class  pw::IntrusiveMultiMap< Key, T >::iterator
 
class  pw::IntrusiveMultiMap< Key, T >::const_iterator
 

Typedefs

using pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::Iterator< kIsConst >::iterator_category = std::forward_iterator_tag
 
using pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::Iterator< kIsConst >::value_type = KeyValueType
 
using pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::Iterator< kIsConst >::difference_type = std::ptrdiff_t
 
using pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::Iterator< kIsConst >::reference = std::conditional_t< kIsConst, const value_type &, value_type & >
 
using pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::Iterator< kIsConst >::pointer = std::conditional_t< kIsConst, const value_type *, value_type * >
 
using pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::key_type = Key
 
using pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::mapped_type = Value
 
using pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::value_type = KeyValueType
 
using pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::size_type = SizeType
 
using pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::difference_type = std::ptrdiff_t
 
using pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::hasher = Hash
 
using pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::key_equal = Equal
 
using pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::allocator_type = Allocator
 
using pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::reference = value_type &
 
using pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::const_reference = const value_type &
 
using pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::pointer = value_type *
 
using pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::const_pointer = const value_type *
 
using pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::iterator = Iterator< false >
 
using pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::const_iterator = Iterator< true >
 
using pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::node_type = NodeType
 
using pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::insert_return_type = std::pair< iterator, bool >
 
using pw::containers::FlatMap< Key, Value, kArraySize >::key_type = Key
 
using pw::containers::FlatMap< Key, Value, kArraySize >::mapped_type = Value
 
using pw::containers::FlatMap< Key, Value, kArraySize >::value_type = Pair< key_type, mapped_type >
 
using pw::containers::FlatMap< Key, Value, kArraySize >::pointer = value_type *
 
using pw::containers::FlatMap< Key, Value, kArraySize >::reference = value_type &
 
using pw::containers::FlatMap< Key, Value, kArraySize >::size_type = size_t
 
using pw::containers::FlatMap< Key, Value, kArraySize >::difference_type = ptrdiff_t
 
using pw::containers::FlatMap< Key, Value, kArraySize >::container_type = typename std::array< value_type, kArraySize >
 
using pw::containers::FlatMap< Key, Value, kArraySize >::iterator = typename container_type::iterator
 
using pw::containers::FlatMap< Key, Value, kArraySize >::const_iterator = typename container_type::const_iterator
 
using pw::containers::FlatMap< Key, Value, kArraySize >::mapped_iterator::value_type = FlatMap::mapped_type
 
using pw::containers::FlatMap< Key, Value, kArraySize >::mapped_iterator::difference_type = std::ptrdiff_t
 
using pw::containers::FlatMap< Key, Value, kArraySize >::mapped_iterator::pointer = value_type *
 
using pw::containers::FlatMap< Key, Value, kArraySize >::mapped_iterator::reference = value_type &
 
using pw::containers::FlatMap< Key, Value, kArraySize >::mapped_iterator::iterator_category = std::bidirectional_iterator_tag
 
using pw::IntrusiveMap< Key, T >::Item = typename Tree::Item
 
using pw::IntrusiveMap< Key, T >::Pair = typename Tree::Pair
 
using pw::IntrusiveMap< Key, T >::key_type = Key
 
using pw::IntrusiveMap< Key, T >::mapped_type = std::remove_cv_t< T >
 
using pw::IntrusiveMap< Key, T >::value_type = Item
 
using pw::IntrusiveMap< Key, T >::size_type = std::size_t
 
using pw::IntrusiveMap< Key, T >::difference_type = std::ptrdiff_t
 
using pw::IntrusiveMap< Key, T >::key_compare = Compare
 
using pw::IntrusiveMap< Key, T >::reference = value_type &
 
using pw::IntrusiveMap< Key, T >::const_reference = const value_type &
 
using pw::IntrusiveMap< Key, T >::pointer = value_type *
 
using pw::IntrusiveMap< Key, T >::const_pointer = const value_type *
 
using pw::IntrusiveMap< Key, T >::reverse_iterator = std::reverse_iterator< iterator >
 
using pw::IntrusiveMap< Key, T >::const_reverse_iterator = std::reverse_iterator< const_iterator >
 
using pw::IntrusiveMultiMap< Key, T >::Item = typename Tree::Item
 
using pw::IntrusiveMultiMap< Key, T >::Pair = typename Tree::Pair
 
using pw::IntrusiveMultiMap< Key, T >::key_type = Key
 
using pw::IntrusiveMultiMap< Key, T >::mapped_type = std::remove_cv_t< T >
 
using pw::IntrusiveMultiMap< Key, T >::value_type = Item
 
using pw::IntrusiveMultiMap< Key, T >::size_type = std::size_t
 
using pw::IntrusiveMultiMap< Key, T >::difference_type = std::ptrdiff_t
 
using pw::IntrusiveMultiMap< Key, T >::key_compare = Compare
 
using pw::IntrusiveMultiMap< Key, T >::reference = value_type &
 
using pw::IntrusiveMultiMap< Key, T >::const_reference = const value_type &
 
using pw::IntrusiveMultiMap< Key, T >::pointer = value_type *
 
using pw::IntrusiveMultiMap< Key, T >::const_pointer = const value_type *
 
using pw::IntrusiveMultiMap< Key, T >::reverse_iterator = std::reverse_iterator< iterator >
 
using pw::IntrusiveMultiMap< Key, T >::const_reverse_iterator = std::reverse_iterator< const_iterator >
 

Functions

template<typename K , typename... Args>
 pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::Node::Node (K &&key, Args &&... args)
 
template<bool kOtherConst, typename = std::enable_if_t<kIsConst && !kOtherConst>>
constexpr pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::Iterator< kIsConst >::Iterator (const Iterator< kOtherConst > &other)
 
reference pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::Iterator< kIsConst >::operator* () const
 
pointer pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::Iterator< kIsConst >::operator-> () const
 
Iterator pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::Iterator< kIsConst >::operator++ ()
 
Iterator pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::Iterator< kIsConst >::operator++ (int)
 
constexpr pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::DynamicHashMap (Allocator &allocator, const Hash &hash=Hash(), const Equal &equal=Equal()) noexcept
 
 pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::DynamicHashMap (const DynamicHashMap &)=delete
 
DynamicHashMappw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::operator= (const DynamicHashMap &)=delete
 
 pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::DynamicHashMap (DynamicHashMap &&other) noexcept
 
DynamicHashMappw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::operator= (DynamicHashMap &&other) noexcept
 
allocator_typepw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::get_allocator () const
 Returns the allocator used by this map.
 
iterator pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::begin ()
 
const_iterator pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::begin () const
 
const_iterator pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::cbegin () const
 
iterator pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::end ()
 
const_iterator pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::end () const
 
const_iterator pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::cend () const
 
bool pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::empty () const
 
size_type pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::size () const
 
size_type pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::max_size () const
 
void pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::clear ()
 
std::optional< insert_return_type > pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::try_insert (const value_type &value)
 
std::optional< insert_return_type > pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::try_insert (value_type &&)=delete
 
insert_return_type pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::insert (const value_type &value)
 Inserts a value into the map. Crashes on allocation failure.
 
insert_return_type pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::insert (value_type &&value)
 
template<typename InputIt , typename = containers::internal::EnableIfInputIterator<InputIt>>
void pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::insert (InputIt first, InputIt last)
 
void pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::insert (std::initializer_list< value_type > ilist)
 
template<typename K , typename... Args>
std::optional< std::pair< iterator, bool > > pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::try_emplace (K &&key, Args &&... args)
 
template<typename K , typename... Args>
std::pair< iterator, bool > pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::emplace (K &&key, Args &&... args)
 Constructs an element in-place. Crashes on allocation failure.
 
iterator pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::erase (iterator pos)
 
iterator pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::erase (const_iterator pos)
 
iterator pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::erase (const_iterator first, const_iterator last)
 
template<typename K >
size_type pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::erase (K &&key)
 
void pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::swap (DynamicHashMap &other) noexcept
 Swaps the contents of two maps. No allocations occur.
 
void pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::merge (DynamicHashMap &other)
 
void pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::merge (DynamicHashMap &&other)
 
mapped_type & pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::at (const key_type &key)
 
const mapped_type & pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::at (const key_type &key) const
 
template<typename U = mapped_type, typename = std::enable_if_t<std::is_default_constructible_v<U>>>
mapped_type & pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::operator[] (const key_type &key)
 
size_type pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::count (const key_type &key) const
 Returns the number of elements with key key (0 or 1).
 
iterator pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::find (const key_type &key)
 
const_iterator pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::find (const key_type &key) const
 
bool pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::contains (const key_type &key) const
 
std::pair< iterator, iterator > pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::equal_range (const key_type &key)
 
std::pair< const_iterator, const_iterator > pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::equal_range (const key_type &key) const
 
size_type pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::load_factor_percent () const
 
size_type pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::max_load_factor_percent () const
 
void pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::max_load_factor_percent (size_type percent)
 
bool pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::try_rehash (size_type count)
 
void pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::rehash (size_type count)
 
bool pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::try_reserve (size_type count)
 
void pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::reserve (size_type count)
 
bool pw::containers::Pair< First, Second >::operator== (const Pair &p) const
 
bool pw::containers::Pair< First, Second >::operator!= (const Pair &p) const
 
constexpr pw::containers::FlatMap< Key, Value, kArraySize >::mapped_iterator::mapped_iterator (const mapped_iterator &other)=default
 
constexpr mapped_iteratorpw::containers::FlatMap< Key, Value, kArraySize >::mapped_iterator::operator= (const mapped_iterator &other)=default
 
constexpr reference pw::containers::FlatMap< Key, Value, kArraySize >::mapped_iterator::operator* () const
 
constexpr pointer pw::containers::FlatMap< Key, Value, kArraySize >::mapped_iterator::operator-> () const
 
constexpr mapped_iteratorpw::containers::FlatMap< Key, Value, kArraySize >::mapped_iterator::operator++ ()
 
constexpr mapped_iterator pw::containers::FlatMap< Key, Value, kArraySize >::mapped_iterator::operator++ (int)
 
constexpr mapped_iteratorpw::containers::FlatMap< Key, Value, kArraySize >::mapped_iterator::operator-- ()
 
constexpr mapped_iterator pw::containers::FlatMap< Key, Value, kArraySize >::mapped_iterator::operator-- (int)
 
constexpr bool pw::containers::FlatMap< Key, Value, kArraySize >::mapped_iterator::operator== (const mapped_iterator &other) const
 
constexpr bool pw::containers::FlatMap< Key, Value, kArraySize >::mapped_iterator::operator!= (const mapped_iterator &other) const
 
constexpr pw::containers::FlatMap< Key, Value, kArraySize >::FlatMap (const std::array< value_type, kArraySize > &items)
 
constexpr pw::containers::FlatMap< Key, Value, kArraySize >::FlatMap (std::array< value_type, kArraySize > &&items)
 
template<typename... Items, typename = std::enable_if_t< std::conjunction_v<std::is_same<Items, value_type>...>>>
constexpr pw::containers::FlatMap< Key, Value, kArraySize >::FlatMap (const Items &... items)
 
 pw::containers::FlatMap< Key, Value, kArraySize >::FlatMap (FlatMap &)=delete
 
FlatMappw::containers::FlatMap< Key, Value, kArraySize >::operator= (FlatMap &)=delete
 
constexpr size_type pw::containers::FlatMap< Key, Value, kArraySize >::size () const
 
constexpr size_type pw::containers::FlatMap< Key, Value, kArraySize >::empty () const
 
constexpr size_type pw::containers::FlatMap< Key, Value, kArraySize >::max_size () const
 
constexpr mapped_type & pw::containers::FlatMap< Key, Value, kArraySize >::at (const key_type &key)
 
constexpr const mapped_type & pw::containers::FlatMap< Key, Value, kArraySize >::at (const key_type &key) const
 
constexpr bool pw::containers::FlatMap< Key, Value, kArraySize >::contains (const key_type &key) const
 
constexpr const_iterator pw::containers::FlatMap< Key, Value, kArraySize >::find (const key_type &key) const
 
constexpr const_iterator pw::containers::FlatMap< Key, Value, kArraySize >::lower_bound (const key_type &key) const
 
constexpr const_iterator pw::containers::FlatMap< Key, Value, kArraySize >::upper_bound (const key_type &key) const
 
constexpr std::pair< const_iterator, const_iterator > pw::containers::FlatMap< Key, Value, kArraySize >::equal_range (const key_type &key) const
 
constexpr const_iterator pw::containers::FlatMap< Key, Value, kArraySize >::begin () const
 
constexpr const_iterator pw::containers::FlatMap< Key, Value, kArraySize >::cbegin () const
 
constexpr const_iterator pw::containers::FlatMap< Key, Value, kArraySize >::end () const
 
constexpr const_iterator pw::containers::FlatMap< Key, Value, kArraySize >::cend () const
 
constexpr mapped_iterator pw::containers::FlatMap< Key, Value, kArraySize >::mapped_begin ()
 
constexpr mapped_iterator pw::containers::FlatMap< Key, Value, kArraySize >::mapped_end ()
 
template<typename K , typename V , typename... Items>
 pw::containers::FlatMap (const Pair< K, V > &item1, const Items &... items) -> FlatMap< K, V, 1+sizeof...(items)>
 
constexpr pw::IntrusiveMap< Key, T >::IntrusiveMap ()
 Constructs an empty map of items.
 
template<typename Comparator >
constexpr pw::IntrusiveMap< Key, T >::IntrusiveMap (Comparator compare)
 
template<typename Comparator , typename KeyRetriever >
constexpr pw::IntrusiveMap< Key, T >::IntrusiveMap (Comparator &&compare, KeyRetriever &&get_key)
 
template<typename Iterator , typename... Functors>
 pw::IntrusiveMap< Key, T >::IntrusiveMap (Iterator first, Iterator last, Functors &&... functors)
 
template<typename... Functors>
 pw::IntrusiveMap< Key, T >::IntrusiveMap (std::initializer_list< T * > items, Functors &&... functors)
 
T & pw::IntrusiveMap< Key, T >::at (const key_type &key)
 
const T & pw::IntrusiveMap< Key, T >::at (const key_type &key) const
 
iterator pw::IntrusiveMap< Key, T >::begin () noexcept
 
const_iterator pw::IntrusiveMap< Key, T >::begin () const noexcept
 
const_iterator pw::IntrusiveMap< Key, T >::cbegin () const noexcept
 
iterator pw::IntrusiveMap< Key, T >::end () noexcept
 
const_iterator pw::IntrusiveMap< Key, T >::end () const noexcept
 
const_iterator pw::IntrusiveMap< Key, T >::cend () const noexcept
 
reverse_iterator pw::IntrusiveMap< Key, T >::rbegin () noexcept
 
const_reverse_iterator pw::IntrusiveMap< Key, T >::rbegin () const noexcept
 
const_reverse_iterator pw::IntrusiveMap< Key, T >::crbegin () const noexcept
 
reverse_iterator pw::IntrusiveMap< Key, T >::rend () noexcept
 
const_reverse_iterator pw::IntrusiveMap< Key, T >::rend () const noexcept
 
const_reverse_iterator pw::IntrusiveMap< Key, T >::crend () const noexcept
 
bool pw::IntrusiveMap< Key, T >::empty () const noexcept
 Returns whether the map has zero items or not.
 
size_t pw::IntrusiveMap< Key, T >::size () const
 Returns the number of items in the map.
 
constexpr size_t pw::IntrusiveMap< Key, T >::max_size () const noexcept
 
void pw::IntrusiveMap< Key, T >::clear ()
 
std::pair< iterator, bool > pw::IntrusiveMap< Key, T >::insert (T &item)
 
iterator pw::IntrusiveMap< Key, T >::insert (iterator, T &item)
 
template<class Iterator >
void pw::IntrusiveMap< Key, T >::insert (Iterator first, Iterator last)
 
void pw::IntrusiveMap< Key, T >::insert (std::initializer_list< T * > ilist)
 
iterator pw::IntrusiveMap< Key, T >::erase (T &item)
 
iterator pw::IntrusiveMap< Key, T >::erase (iterator pos)
 
iterator pw::IntrusiveMap< Key, T >::erase (iterator first, iterator last)
 
size_t pw::IntrusiveMap< Key, T >::erase (const key_type &key)
 
void pw::IntrusiveMap< Key, T >::swap (IntrusiveMap< Key, T > &other)
 Exchanges this map's items with the other map's items.
 
template<typename MapType >
void pw::IntrusiveMap< Key, T >::merge (MapType &other)
 Splices items from the other map into this one.
 
size_t pw::IntrusiveMap< Key, T >::count (const key_type &key) const
 
iterator pw::IntrusiveMap< Key, T >::find (const key_type &key)
 
const_iterator pw::IntrusiveMap< Key, T >::find (const key_type &key) const
 
std::pair< iterator, iteratorpw::IntrusiveMap< Key, T >::equal_range (const key_type &key)
 
std::pair< const_iterator, const_iteratorpw::IntrusiveMap< Key, T >::equal_range (const key_type &key) const
 
iterator pw::IntrusiveMap< Key, T >::lower_bound (const key_type &key)
 
const_iterator pw::IntrusiveMap< Key, T >::lower_bound (const key_type &key) const
 
iterator pw::IntrusiveMap< Key, T >::upper_bound (const key_type &key)
 
const_iterator pw::IntrusiveMap< Key, T >::upper_bound (const key_type &key) const
 
constexpr pw::IntrusiveMultiMap< Key, T >::IntrusiveMultiMap ()
 Constructs an empty map of items.
 
template<typename Comparator >
constexpr pw::IntrusiveMultiMap< Key, T >::IntrusiveMultiMap (Comparator compare)
 
template<typename Comparator , typename KeyRetriever >
constexpr pw::IntrusiveMultiMap< Key, T >::IntrusiveMultiMap (Comparator &&compare, KeyRetriever &&get_key)
 
template<typename Iterator , typename... Functors>
 pw::IntrusiveMultiMap< Key, T >::IntrusiveMultiMap (Iterator first, Iterator last, Functors &&... functors)
 
template<typename... Functors>
 pw::IntrusiveMultiMap< Key, T >::IntrusiveMultiMap (std::initializer_list< T * > items, Functors &&... functors)
 
iterator pw::IntrusiveMultiMap< Key, T >::begin () noexcept
 
const_iterator pw::IntrusiveMultiMap< Key, T >::begin () const noexcept
 
const_iterator pw::IntrusiveMultiMap< Key, T >::cbegin () const noexcept
 
iterator pw::IntrusiveMultiMap< Key, T >::end () noexcept
 
const_iterator pw::IntrusiveMultiMap< Key, T >::end () const noexcept
 
const_iterator pw::IntrusiveMultiMap< Key, T >::cend () const noexcept
 
reverse_iterator pw::IntrusiveMultiMap< Key, T >::rbegin () noexcept
 
const_reverse_iterator pw::IntrusiveMultiMap< Key, T >::rbegin () const noexcept
 
const_reverse_iterator pw::IntrusiveMultiMap< Key, T >::crbegin () const noexcept
 
reverse_iterator pw::IntrusiveMultiMap< Key, T >::rend () noexcept
 
const_reverse_iterator pw::IntrusiveMultiMap< Key, T >::rend () const noexcept
 
const_reverse_iterator pw::IntrusiveMultiMap< Key, T >::crend () const noexcept
 
bool pw::IntrusiveMultiMap< Key, T >::empty () const noexcept
 Returns whether the multimap has zero items or not.
 
size_t pw::IntrusiveMultiMap< Key, T >::size () const
 Returns the number of items in the multimap.
 
constexpr size_t pw::IntrusiveMultiMap< Key, T >::max_size () const noexcept
 
void pw::IntrusiveMultiMap< Key, T >::clear ()
 
iterator pw::IntrusiveMultiMap< Key, T >::insert (T &item)
 Adds the given item to the multimap.
 
iterator pw::IntrusiveMultiMap< Key, T >::insert (iterator, T &item)
 
template<class Iterator >
void pw::IntrusiveMultiMap< Key, T >::insert (Iterator first, Iterator last)
 
void pw::IntrusiveMultiMap< Key, T >::insert (std::initializer_list< T * > ilist)
 
iterator pw::IntrusiveMultiMap< Key, T >::erase (T &item)
 
iterator pw::IntrusiveMultiMap< Key, T >::erase (iterator pos)
 
iterator pw::IntrusiveMultiMap< Key, T >::erase (iterator first, iterator last)
 
size_t pw::IntrusiveMultiMap< Key, T >::erase (const Key &key)
 
void pw::IntrusiveMultiMap< Key, T >::swap (IntrusiveMultiMap< Key, T > &other)
 Exchanges this multimap's items with the other multimap's items.
 
template<typename MapType >
void pw::IntrusiveMultiMap< Key, T >::merge (MapType &other)
 Splices items from the other map into this one.
 
size_t pw::IntrusiveMultiMap< Key, T >::count (const Key &key) const
 Returns the number of items in the multimap with the given key.
 
iterator pw::IntrusiveMultiMap< Key, T >::find (const Key &key)
 
const_iterator pw::IntrusiveMultiMap< Key, T >::find (const Key &key) const
 
std::pair< iterator, iteratorpw::IntrusiveMultiMap< Key, T >::equal_range (const Key &key)
 
std::pair< const_iterator, const_iteratorpw::IntrusiveMultiMap< Key, T >::equal_range (const Key &key) const
 
iterator pw::IntrusiveMultiMap< Key, T >::lower_bound (const Key &key)
 
const_iterator pw::IntrusiveMultiMap< Key, T >::lower_bound (const Key &key) const
 
iterator pw::IntrusiveMultiMap< Key, T >::upper_bound (const Key &key)
 
const_iterator pw::IntrusiveMultiMap< Key, T >::upper_bound (const Key &key) const
 

Variables

std::pair< const Key, Value > pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::Node::key_value
 The stored key-value pair.
 
Node * pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::Node::next = nullptr
 Pointer to the next node in the same hash bucket (collision chain).
 
SizeType pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::Node::index = 0
 Index of this node in the nodes_ vector, enabling O(1) erasure.
 
First pw::containers::Pair< First, Second >::first
 
Second pw::containers::Pair< First, Second >::second
 

Friends

class pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::Iterator< kIsConst >::DynamicHashMap
 
class pw::containers::FlatMap< Key, Value, kArraySize >::mapped_iterator::FlatMap
 
template<typename , typename >
class pw::IntrusiveMap< Key, T >::IntrusiveMultiMap
 
template<typename , typename >
class pw::IntrusiveMultiMap< Key, T >::IntrusiveMap
 
bool pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::Iterator< kIsConst >::operator== (Iterator lhs, Iterator rhs)
 
bool pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::Iterator< kIsConst >::operator!= (Iterator lhs, Iterator rhs)
 

Typedef Documentation

◆ Item [1/2]

template<typename Key , typename T >
using pw::IntrusiveMap< Key, T >::Item = typename Tree::Item

IntrusiveMap items must derive from either Item or Pair. Use Pair to automatically provide storage for a Key. Use Item when the derived type has a key() accessor method or when the map provides a custom GetKey function object.

◆ Item [2/2]

template<typename Key , typename T >
using pw::IntrusiveMultiMap< Key, T >::Item = typename Tree::Item

IntrusiveMultiMap items must derive from either Item or Pair. Use Pair to automatically provide storage for a Key. Use Item when the derived type has a key() accessor method or when the map provides a custom GetKey function object.

Function Documentation

◆ at() [1/4]

template<typename Key , typename Value , typename Hash = pw::Hash, typename Equal = pw::EqualTo, typename SizeType = uint16_t>
mapped_type & pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::at ( const key_type &  key)
inline

Returns a reference to the mapped value of the element with key equivalent to key.

Precondition
The key must exist in the map. Crashes if not found.

◆ at() [2/4]

template<typename Key , typename Value , size_t kArraySize>
constexpr mapped_type & pw::containers::FlatMap< Key, Value, kArraySize >::at ( const key_type &  key)
inlineconstexpr

Accesses a mutable mapped value.

Precondition
The key must exist.
Parameters
[in]keyThe key to the mapped value.
Returns
A reference to the mapped value.

◆ at() [3/4]

template<typename Key , typename T >
T & pw::IntrusiveMap< Key, T >::at ( const key_type &  key)
inline

Returns a reference to the item associated with the given key.

Precondition
The map must contain an item associated with the key.

◆ at() [4/4]

template<typename Key , typename Value , size_t kArraySize>
constexpr const mapped_type & pw::containers::FlatMap< Key, Value, kArraySize >::at ( const key_type &  key) const
inlineconstexpr

Accesses a mapped value.

Precondition
The key must exist.
Parameters
[in]keyThe key to the mapped value.
Returns
A const reference to the mapped value.

◆ clear() [1/3]

template<typename Key , typename Value , typename Hash = pw::Hash, typename Equal = pw::EqualTo, typename SizeType = uint16_t>
void pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::clear ( )
inline

Removes all elements from the map.

This destroys all nodes and deallocates them via the allocator.

◆ clear() [2/3]

template<typename Key , typename T >
void pw::IntrusiveMap< Key, T >::clear ( )
inline

Removes all items from the map and leaves it empty.

The items themselves are not destructed.

◆ clear() [3/3]

template<typename Key , typename T >
void pw::IntrusiveMultiMap< Key, T >::clear ( )
inline

Removes all items from the multimap and leaves it empty.

The items themselves are not destructed.

◆ contains()

template<typename Key , typename Value , typename Hash = pw::Hash, typename Equal = pw::EqualTo, typename SizeType = uint16_t>
bool pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::contains ( const key_type &  key) const
inline

Checks if there is an element with key equivalent to key in the container.

◆ count()

template<typename Key , typename T >
size_t pw::IntrusiveMap< Key, T >::count ( const key_type &  key) const
inline

Returns the number of items in the map with the given key.

Since the map requires unique keys, this is always 0 or 1.

◆ DynamicHashMap() [1/3]

template<typename Key , typename Value , typename Hash = pw::Hash, typename Equal = pw::EqualTo, typename SizeType = uint16_t>
constexpr pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::DynamicHashMap ( Allocator allocator,
const Hash hash = Hash(),
const Equal &  equal = Equal() 
)
inlineexplicitconstexprnoexcept

Constructs an empty DynamicHashMap. No memory is allocated.

Since allocations can fail, initialization in the constructor is not supported.

◆ DynamicHashMap() [2/3]

template<typename Key , typename Value , typename Hash = pw::Hash, typename Equal = pw::EqualTo, typename SizeType = uint16_t>
pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::DynamicHashMap ( const DynamicHashMap< Key, Value, Hash, Equal, SizeType > &  )
delete

Copy construction/assignment is not supported because they require allocations that could fail.

◆ DynamicHashMap() [3/3]

template<typename Key , typename Value , typename Hash = pw::Hash, typename Equal = pw::EqualTo, typename SizeType = uint16_t>
pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::DynamicHashMap ( DynamicHashMap< Key, Value, Hash, Equal, SizeType > &&  other)
inlinenoexcept

Move construction is supported since it cannot fail. Copy construction is not supported.

◆ equal_range() [1/3]

template<typename Key , typename T >
std::pair< iterator, iterator > pw::IntrusiveMultiMap< Key, T >::equal_range ( const Key &  key)
inline

Returns a pair of iterators where the first points to the item with the smallest key that is not less than the given key, and the second points to the item with the smallest key that is greater than the given key.

◆ equal_range() [2/3]

template<typename Key , typename Value , typename Hash = pw::Hash, typename Equal = pw::EqualTo, typename SizeType = uint16_t>
std::pair< iterator, iterator > pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::equal_range ( const key_type &  key)
inline

Returns a range containing all elements with the given key in the container. Since this is a unique map, the range will contain at most one element.

◆ equal_range() [3/3]

template<typename Key , typename T >
std::pair< iterator, iterator > pw::IntrusiveMap< Key, T >::equal_range ( const key_type &  key)
inline

Returns a pair of iterators where the first points to the item with the smallest key that is not less than the given key, and the second points to the item with the smallest key that is greater than the given key.

◆ erase() [1/5]

template<typename Key , typename Value , typename Hash = pw::Hash, typename Equal = pw::EqualTo, typename SizeType = uint16_t>
iterator pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::erase ( const_iterator  first,
const_iterator  last 
)
inline

Removes elements in the range [first, last).

Note
This operation iterates backwards and erases to handle the invalidation caused by "swap-and-pop" erasure.

◆ erase() [2/5]

template<typename Key , typename Value , typename Hash = pw::Hash, typename Equal = pw::EqualTo, typename SizeType = uint16_t>
iterator pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::erase ( iterator  pos)
inline

Removes the element at pos.

Note
Because the underlying storage is unstable ("swap-and-pop"), erasing an element invalidates iterators to the element that was swapped into the erased position (the last element).
Returns
Iterator following the removed element.

◆ erase() [3/5]

template<typename Key , typename Value , typename Hash = pw::Hash, typename Equal = pw::EqualTo, typename SizeType = uint16_t>
template<typename K >
size_type pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::erase ( K &&  key)
inline

Removes the element with the matching key. Returns number of elements removed (0 or 1).

◆ erase() [4/5]

template<typename Key , typename T >
iterator pw::IntrusiveMap< Key, T >::erase ( T &  item)
inline

Removes an item from the map and returns an iterator to the item after the removed item..

The items themselves are not destructed.

◆ erase() [5/5]

template<typename Key , typename T >
iterator pw::IntrusiveMultiMap< Key, T >::erase ( T &  item)
inline

Removes an item from the multimap and returns an iterator to the item after the removed item.

The items themselves are not destructed.

◆ find() [1/3]

template<typename Key , typename T >
iterator pw::IntrusiveMultiMap< Key, T >::find ( const Key &  key)
inline

Returns a pointer to an item with the given key, or null if the multimap does not contain such an item.

◆ find() [2/3]

template<typename Key , typename Value , typename Hash = pw::Hash, typename Equal = pw::EqualTo, typename SizeType = uint16_t>
iterator pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::find ( const key_type &  key)
inline

Finds an element with key equivalent to key.

Returns
Iterator to an element with key equivalent to key, or end() if no such element is found.

◆ find() [3/3]

template<typename Key , typename T >
iterator pw::IntrusiveMap< Key, T >::find ( const key_type &  key)
inline

Returns a pointer to an item with the given key, or null if the map does not contain such an item.

◆ insert()

template<typename Key , typename T >
std::pair< iterator, bool > pw::IntrusiveMap< Key, T >::insert ( T &  item)
inline

Attempts to add the given item to the map.

The item will be added if the map does not already contain an item with the given item's key.

Returns
A pointer to the inserted item and true, or a pointer to the existing item with same key and false.

◆ IntrusiveMap() [1/4]

template<typename Key , typename T >
template<typename Comparator , typename KeyRetriever >
constexpr pw::IntrusiveMap< Key, T >::IntrusiveMap ( Comparator &&  compare,
KeyRetriever &&  get_key 
)
inlineconstexpr

Constructs an empty map of items.

Parameters
compareFunction with the signature bool(Key, Key) that is used to order items.
get_keyFunction with signature Key(const T&) that returns the value that items are sorted on.

◆ IntrusiveMap() [2/4]

template<typename Key , typename T >
template<typename Comparator >
constexpr pw::IntrusiveMap< Key, T >::IntrusiveMap ( Comparator  compare)
inlineexplicitconstexpr

Constructs an empty map of items.

SFINAE is used to disambiguate between this constructor and the one that takes an initializer list.

Parameters
compareFunction with the signature bool(Key, Key) that is used to order items.

◆ IntrusiveMap() [3/4]

template<typename Key , typename T >
template<typename Iterator , typename... Functors>
pw::IntrusiveMap< Key, T >::IntrusiveMap ( Iterator  first,
Iterator  last,
Functors &&...  functors 
)
inline

Constructs an IntrusiveMap from an iterator over Items.

The iterator may dereference as either Item& (e.g. from std::array<Item>) or Item* (e.g. from std::initializer_list<Item*>).

◆ IntrusiveMap() [4/4]

template<typename Key , typename T >
template<typename... Functors>
pw::IntrusiveMap< Key, T >::IntrusiveMap ( std::initializer_list< T * >  items,
Functors &&...  functors 
)
inlineexplicit

Constructs an IntrusiveMap from a std::initializer_list of pointers to items.

◆ IntrusiveMultiMap() [1/4]

template<typename Key , typename T >
template<typename Comparator , typename KeyRetriever >
constexpr pw::IntrusiveMultiMap< Key, T >::IntrusiveMultiMap ( Comparator &&  compare,
KeyRetriever &&  get_key 
)
inlineconstexpr

Constructs an empty map of items.

Parameters
compareFunction with the signature bool(Key, Key) that is used to order items.
get_keyFunction with signature Key(const T&) that returns the value that items are sorted on.

◆ IntrusiveMultiMap() [2/4]

template<typename Key , typename T >
template<typename Comparator >
constexpr pw::IntrusiveMultiMap< Key, T >::IntrusiveMultiMap ( Comparator  compare)
inlineexplicitconstexpr

Constructs an empty map of items.

SFINAE is used to disambiguate between this constructor and the one that takes an initializer list.

Parameters
compareFunction with the signature bool(Key, Key) that is used to order items.
get_keyFunction with signature Key(const T&) that returns the value that items are sorted on.

◆ IntrusiveMultiMap() [3/4]

template<typename Key , typename T >
template<typename Iterator , typename... Functors>
pw::IntrusiveMultiMap< Key, T >::IntrusiveMultiMap ( Iterator  first,
Iterator  last,
Functors &&...  functors 
)
inline

Constructs an IntrusiveMultiMap from an iterator over Items.

The iterator may dereference as either Item& (e.g. from std::array<Item>) or Item* (e.g. from std::initializer_list<Item*>).

◆ IntrusiveMultiMap() [4/4]

template<typename Key , typename T >
template<typename... Functors>
pw::IntrusiveMultiMap< Key, T >::IntrusiveMultiMap ( std::initializer_list< T * >  items,
Functors &&...  functors 
)
inline

Constructs an IntrusiveMultiMap from a std::initializer_list of pointers to items.

◆ load_factor_percent()

template<typename Key , typename Value , typename Hash = pw::Hash, typename Equal = pw::EqualTo, typename SizeType = uint16_t>
size_type pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::load_factor_percent ( ) const
inline

Returns the current load factor (ratio of elements to buckets) as a percentage.

◆ lower_bound() [1/2]

template<typename Key , typename T >
iterator pw::IntrusiveMultiMap< Key, T >::lower_bound ( const Key &  key)
inline

Returns an iterator to the item in the multimap with the smallest key that is greater than or equal to the given key, or end() if the multimap is empty.

◆ lower_bound() [2/2]

template<typename Key , typename T >
iterator pw::IntrusiveMap< Key, T >::lower_bound ( const key_type &  key)
inline

Returns an iterator to the item in the map with the smallest key that is greater than or equal to the given key, or end() if the map is empty.

◆ mapped_begin()

template<typename Key , typename Value , size_t kArraySize>
constexpr mapped_iterator pw::containers::FlatMap< Key, Value, kArraySize >::mapped_begin ( )
inlineconstexpr

Gets an iterator to the first mapped value.

Mapped iterators iterate through the mapped values, and allow mutation of those values (for a non-const FlatMap object).

Returns
An iterator to the first mapped value.

◆ mapped_end()

template<typename Key , typename Value , size_t kArraySize>
constexpr mapped_iterator pw::containers::FlatMap< Key, Value, kArraySize >::mapped_end ( )
inlineconstexpr

Gets an iterator to one past the last mapped value.

Mapped iterators iterate through the mapped values, and allow mutation of those values (for a non-const FlatMap object).

Returns
An iterator to one past the last mapped value.

◆ max_load_factor_percent() [1/2]

template<typename Key , typename Value , typename Hash = pw::Hash, typename Equal = pw::EqualTo, typename SizeType = uint16_t>
size_type pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::max_load_factor_percent ( ) const
inline

Returns the maximum load factor (in percent) that the map attempts to maintain.

◆ max_load_factor_percent() [2/2]

template<typename Key , typename Value , typename Hash = pw::Hash, typename Equal = pw::EqualTo, typename SizeType = uint16_t>
void pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::max_load_factor_percent ( size_type  percent)
inline

Sets the maximum load factor (in percent).

This operation does not trigger a rehash, but will affect the threshold for future automatic rehashes.

◆ max_size() [1/2]

template<typename Key , typename T >
constexpr size_t pw::IntrusiveMap< Key, T >::max_size ( ) const
inlineconstexprnoexcept

Returns how many items can be added.

As an intrusive container, this is effectively unbounded.

◆ max_size() [2/2]

template<typename Key , typename T >
constexpr size_t pw::IntrusiveMultiMap< Key, T >::max_size ( ) const
inlineconstexprnoexcept

Returns how many items can be added.

As an intrusive container, this is effectively unbounded.

◆ merge()

template<typename Key , typename Value , typename Hash = pw::Hash, typename Equal = pw::EqualTo, typename SizeType = uint16_t>
void pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::merge ( DynamicHashMap< Key, Value, Hash, Equal, SizeType > &  other)
inline

Merges another map into this one.

Attempts to extract each element in other and insert it into this. The element is removed from other only if the insertion is successful.

Note
  1. Requires node reallocation.
  2. May trigger multiple rehashes.
  3. Could be optimized by switching to DynamicPtrVector's take() and insert().

◆ operator=()

template<typename Key , typename Value , typename Hash = pw::Hash, typename Equal = pw::EqualTo, typename SizeType = uint16_t>
DynamicHashMap & pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::operator= ( DynamicHashMap< Key, Value, Hash, Equal, SizeType > &&  other)
inlinenoexcept

Move assignment clears the current map and takes ownership of nodes from other.

◆ operator[]()

template<typename Key , typename Value , typename Hash = pw::Hash, typename Equal = pw::EqualTo, typename SizeType = uint16_t>
template<typename U = mapped_type, typename = std::enable_if_t<std::is_default_constructible_v<U>>>
mapped_type & pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::operator[] ( const key_type &  key)
inline

Returns a reference to the value associated with key. If key does not exist, it is inserted via a default-constructed value.

Precondition
The allocation of a new node must succeed. Crashes on failure.

◆ rehash()

template<typename Key , typename Value , typename Hash = pw::Hash, typename Equal = pw::EqualTo, typename SizeType = uint16_t>
void pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::rehash ( size_type  count)
inline

Sets the number of buckets to count and rehashes the container. Crashes on allocation failure.

◆ reserve()

template<typename Key , typename Value , typename Hash = pw::Hash, typename Equal = pw::EqualTo, typename SizeType = uint16_t>
void pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::reserve ( size_type  count)
inline

Reserves enough space for count elements. Crashes on allocation failure.

◆ try_emplace()

template<typename Key , typename Value , typename Hash = pw::Hash, typename Equal = pw::EqualTo, typename SizeType = uint16_t>
template<typename K , typename... Args>
std::optional< std::pair< iterator, bool > > pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::try_emplace ( K &&  key,
Args &&...  args 
)
inline

Attempts to construct an element in-place.

Returns
A pair containing the iterator and success bool, or std::nullopt on allocation failure.

◆ try_insert()

template<typename Key , typename Value , typename Hash = pw::Hash, typename Equal = pw::EqualTo, typename SizeType = uint16_t>
std::optional< insert_return_type > pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::try_insert ( const value_type &  value)
inline

Attempts to insert a value into the map.

Returns
An insert_return_type on success, or std::nullopt if allocation fails.

◆ try_rehash()

template<typename Key , typename Value , typename Hash = pw::Hash, typename Equal = pw::EqualTo, typename SizeType = uint16_t>
bool pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::try_rehash ( size_type  count)
inline

Attempts to set the number of buckets to count and rehash the container.

Returns
true if successful, false if allocation fails.

◆ try_reserve()

template<typename Key , typename Value , typename Hash = pw::Hash, typename Equal = pw::EqualTo, typename SizeType = uint16_t>
bool pw::DynamicHashMap< Key, Value, Hash, Equal, SizeType >::try_reserve ( size_type  count)
inline

Attempts to prepare the map to hold at least count elements without requiring further rehashing or node vector reallocation.

This may rehash the map to increase bucket count and reserve space in the underlying node vector.

Note
This does NOT guarantee that future operations that add items will succeed, since they require separate allocations for the objects (nodes) themselves.
Returns
true if successful; false if allocation failed.

◆ upper_bound() [1/2]

template<typename Key , typename T >
iterator pw::IntrusiveMultiMap< Key, T >::upper_bound ( const Key &  key)
inline

Returns an iterator to the item in the multimap with the smallest key that is strictly greater than the given key, or end() if the multimap is empty.

◆ upper_bound() [2/2]

template<typename Key , typename T >
iterator pw::IntrusiveMap< Key, T >::upper_bound ( const key_type &  key)
inline

Returns an iterator to the item in the map with the smallest key that is strictly greater than the given key, or end() if the map is empty.