IceShard 1
A personal game engine project, with development focused on 2D/2.5D games.
Loading...
Searching...
No Matches
ice::detail::hashmap Namespace Reference

Classes

struct  FindResult

Concepts

concept  HashMapContainer
 A concept used to enable access to read-only operations for all compatible types.

Typedefs

template<ice::concepts::AssociativeContainerType T>
using HashMapEntryType = ice::const_correct_t<T, typename std::remove_reference_t<T>::EntryType>

Functions

constexpr auto calc_required_capacity (ice::ncount max_count) noexcept -> ice::ncount
constexpr auto capacity_with_overhead (ice::ncount max_count) noexcept -> ice::ncount
template<typename EntryType, typename ValueType>
constexpr auto calc_meminfo (ice::ncount capacity) noexcept -> ice::meminfo
template<ice::detail::hashmap::HashMapContainer ContainerT>
auto entries (ContainerT const &map) noexcept -> ice::Span< typename ContainerT::EntryType const >
template<ice::detail::hashmap::HashMapContainer ContainerT>
auto find (ContainerT const &map, ice::u64 key) noexcept -> FindResult
template<ice::detail::hashmap::HashMapContainer ContainerT>
auto make (ContainerT &map, ice::u64 key) noexcept -> ice::u32
template<ice::detail::hashmap::HashMapContainer ContainerT>
void erase (ContainerT &map, FindResult const fr) noexcept
template<ice::detail::hashmap::HashMapContainer ContainerT>
auto find_or_fail (ContainerT const &map, ice::container::KeyType< ContainerT > key) noexcept -> ice::u32
template<ice::detail::hashmap::HashMapContainer ContainerT>
auto find_or_make (ContainerT &map, ice::u64 key, bool &found) noexcept -> ice::u32
template<ice::detail::hashmap::HashMapContainer ContainerT>
bool find_and_erase (ContainerT &map, ice::u64 key) noexcept
template<ice::detail::hashmap::HashMapContainer ContainerT>
auto find (ContainerT &map, ice::u32 entry_index) noexcept -> FindResult

Variables

static constexpr ice::f32 Constant_HashMapMaxFill = 0.7f
static constexpr ice::u32 Constant_EndOfList = 0xffffffffu

Typedef Documentation

◆ HashMapEntryType

using ice::detail::hashmap::HashMapEntryType = ice::const_correct_t<T, typename std::remove_reference_t<T>::EntryType>

Function Documentation

◆ calc_meminfo()

template<typename EntryType, typename ValueType>
auto ice::detail::hashmap::calc_meminfo ( ice::ncount capacity) -> ice::meminfo
constexprnoexcept

◆ calc_required_capacity()

auto ice::detail::hashmap::calc_required_capacity ( ice::ncount max_count) -> ice::ncount
constexprnoexcept

◆ capacity_with_overhead()

auto ice::detail::hashmap::capacity_with_overhead ( ice::ncount max_count) -> ice::ncount
constexprnoexcept

◆ entries()

auto ice::detail::hashmap::entries ( ContainerT const & map) -> ice::Span< typename ContainerT::EntryType const >
inlinenoexcept

◆ erase()

void ice::detail::hashmap::erase ( ContainerT & map,
FindResult const fr )
inlinenoexcept

◆ find() [1/2]

auto ice::detail::hashmap::find ( ContainerT & map,
ice::u32 entry_index ) -> FindResult
inlinenoexcept

◆ find() [2/2]

auto ice::detail::hashmap::find ( ContainerT const & map,
ice::u64 key ) -> FindResult
inlinenoexcept

◆ find_and_erase()

bool ice::detail::hashmap::find_and_erase ( ContainerT & map,
ice::u64 key )
inlinenoexcept

◆ find_or_fail()

auto ice::detail::hashmap::find_or_fail ( ContainerT const & map,
ice::container::KeyType< ContainerT > key ) -> ice::u32
inlinenoexcept

◆ find_or_make()

auto ice::detail::hashmap::find_or_make ( ContainerT & map,
ice::u64 key,
bool & found ) -> ice::u32
inlinenoexcept

◆ make()

auto ice::detail::hashmap::make ( ContainerT & map,
ice::u64 key ) -> ice::u32
inlinenoexcept

Variable Documentation

◆ Constant_EndOfList

ice::u32 ice::detail::hashmap::Constant_EndOfList = 0xffffffffu
staticconstexpr

◆ Constant_HashMapMaxFill

ice::f32 ice::detail::hashmap::Constant_HashMapMaxFill = 0.7f
staticconstexpr