CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::FlatHashSet< T, H, E, A > Class Template Reference

#include <CeresEngine/Foundation/Container/FlatHashMap.hpp>

Inheritance diagram for CeresEngine::FlatHashSet< T, H, E, A >:
CeresEngine::detailv3::SherwoodV3Table< T, FindKey, ArgumentHash, Hasher, ArgumentEqual, Equal, ArgumentAlloc, EntryAlloc > CeresEngine::Hasher< T >

Public Types

using key_type = T
 
- Public Types inherited from CeresEngine::detailv3::SherwoodV3Table< T, FindKey, ArgumentHash, Hasher, ArgumentEqual, Equal, ArgumentAlloc, EntryAlloc >
using value_type = T
 
using size_type = size_t
 
using difference_type = std::ptrdiff_t
 
using hasher = ArgumentHash
 
using key_equal = ArgumentEqual
 
using allocator_type = EntryAlloc
 
using reference = value_type &
 
using const_reference = const value_type &
 
using pointer = value_type *
 
using const_pointer = const value_type *
 
using iterator = templated_iterator< value_type >
 
using const_iterator = templated_iterator< const value_type >
 

Public Member Functions

 FlatHashSet ()
 
template<typename... Args>
Pair< typename Table::iterator, boolemplace (Args &&... args)
 
Pair< typename Table::iterator, boolemplace (const key_type &arg)
 
Pair< typename Table::iterator, boolemplace (key_type &arg)
 
Pair< typename Table::iterator, boolemplace (const key_type &&arg)
 
Pair< typename Table::iterator, boolemplace (key_type &&arg)
 
- Public Member Functions inherited from CeresEngine::detailv3::SherwoodV3Table< T, FindKey, ArgumentHash, Hasher, ArgumentEqual, Equal, ArgumentAlloc, EntryAlloc >
 SherwoodV3Table ()
 
 SherwoodV3Table (const size_type bucket_count, const ArgumentHash &hash=ArgumentHash(), const ArgumentEqual &equal=ArgumentEqual(), const ArgumentAlloc &alloc=ArgumentAlloc())
 
 SherwoodV3Table (size_type bucket_count, const ArgumentAlloc &alloc)
 
 SherwoodV3Table (size_type bucket_count, const ArgumentHash &hash, const ArgumentAlloc &alloc)
 
 SherwoodV3Table (const ArgumentAlloc &alloc)
 
template<typename It >
 SherwoodV3Table (It first, It last, size_type bucket_count=0, const ArgumentHash &hash=ArgumentHash(), const ArgumentEqual &equal=ArgumentEqual(), const ArgumentAlloc &alloc=ArgumentAlloc())
 
template<typename It >
 SherwoodV3Table (It first, It last, size_type bucket_count, const ArgumentAlloc &alloc)
 
template<typename It >
 SherwoodV3Table (It first, It last, size_type bucket_count, const ArgumentHash &hash, const ArgumentAlloc &alloc)
 
 SherwoodV3Table (std::initializer_list< T > il, size_type bucket_count=0, const ArgumentHash &hash=ArgumentHash(), const ArgumentEqual &equal=ArgumentEqual(), const ArgumentAlloc &alloc=ArgumentAlloc())
 
 SherwoodV3Table (std::initializer_list< T > il, size_type bucket_count, const ArgumentAlloc &alloc)
 
 SherwoodV3Table (std::initializer_list< T > il, size_type bucket_count, const ArgumentHash &hash, const ArgumentAlloc &alloc)
 
 SherwoodV3Table (const SherwoodV3Table &other)
 
 SherwoodV3Table (const SherwoodV3Table &other, const ArgumentAlloc &alloc)
 
 SherwoodV3Table (SherwoodV3Table &&other) noexcept
 
 SherwoodV3Table (SherwoodV3Table &&other, const ArgumentAlloc &alloc) noexcept
 
SherwoodV3Tableoperator= (const SherwoodV3Table &other)
 
SherwoodV3Tableoperator= (SherwoodV3Table &&other) noexcept
 
 ~SherwoodV3Table ()
 
const allocator_typeget_allocator () const
 
const ArgumentEqualkey_eq () const
 
const ArgumentHashhash_function () const
 
iterator begin ()
 
const_iterator begin () const
 
const_iterator cbegin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator cend () const
 
iterator find (const FindKey &key)
 
const_iterator find (const FindKey &key) const
 
size_t count (const FindKey &key) const
 
Pair< iterator, iteratorequal_range (const FindKey &key)
 
Pair< const_iterator, const_iteratorequal_range (const FindKey &key) const
 
template<typename Key , typename... Args>
Pair< iterator, boolemplace (Key &&key, Args &&... args)
 
Pair< iterator, boolinsert (const value_type &value)
 
Pair< iterator, boolinsert (value_type &&value)
 
template<typename... Args>
iterator emplace_hint (const_iterator, Args &&... args)
 
iterator insert (const_iterator, const value_type &value)
 
iterator insert (const_iterator, value_type &&value)
 
template<typename It >
void insert (It begin, It end)
 
void insert (std::initializer_list< value_type > il)
 
void rehash (size_t num_buckets)
 
void reserve (const size_t num_elements)
 
convertible_to_iterator erase (const_iterator to_erase)
 
iterator erase (const_iterator begin_it, const_iterator end_it)
 
size_t erase (const FindKey &key)
 
void clear ()
 
void shrink_to_fit ()
 
void swap (SherwoodV3Table &other)
 
size_t size () const
 
size_t max_size () const
 
size_t bucket_count () const
 
size_type max_bucket_count () const
 
size_t bucket (const FindKey &key) const
 
float load_factor () const
 
void max_load_factor (const float value)
 
float max_load_factor () const
 
bool empty () const
 

Private Types

using Table = detailv3::SherwoodV3Table< T, T, H, detailv3::FunctorStorage< size_t, H >, E, detailv3::FunctorStorage< bool, E >, A, typename std::allocator_traits< A >::template rebind_alloc< detailv3::SherwoodV3Entry< T > > >
 

Friends

bool operator== (const FlatHashSet &lhs, const FlatHashSet &rhs)
 
bool operator!= (const FlatHashSet &lhs, const FlatHashSet &rhs)
 

Member Typedef Documentation

◆ key_type

template<typename T , typename H = std::hash<T>, typename E = std::equal_to<>, typename A = std::allocator<T>>
using CeresEngine::FlatHashSet< T, H, E, A >::key_type = T

◆ Table

template<typename T , typename H = std::hash<T>, typename E = std::equal_to<>, typename A = std::allocator<T>>
using CeresEngine::FlatHashSet< T, H, E, A >::Table = detailv3::SherwoodV3Table<T, T, H, detailv3::FunctorStorage<size_t, H>, E, detailv3::FunctorStorage<bool, E>, A, typename std::allocator_traits<A>::template rebind_alloc<detailv3::SherwoodV3Entry<T> >>
private

Constructor & Destructor Documentation

◆ FlatHashSet()

template<typename T , typename H = std::hash<T>, typename E = std::equal_to<>, typename A = std::allocator<T>>
CeresEngine::FlatHashSet< T, H, E, A >::FlatHashSet ( )
inline

Member Function Documentation

◆ emplace() [1/5]

template<typename T , typename H = std::hash<T>, typename E = std::equal_to<>, typename A = std::allocator<T>>
template<typename... Args>
Pair< typename Table::iterator, bool > CeresEngine::FlatHashSet< T, H, E, A >::emplace ( Args &&...  args)
inline

◆ emplace() [2/5]

template<typename T , typename H = std::hash<T>, typename E = std::equal_to<>, typename A = std::allocator<T>>
Pair< typename Table::iterator, bool > CeresEngine::FlatHashSet< T, H, E, A >::emplace ( const key_type &&  arg)
inline

◆ emplace() [3/5]

template<typename T , typename H = std::hash<T>, typename E = std::equal_to<>, typename A = std::allocator<T>>
Pair< typename Table::iterator, bool > CeresEngine::FlatHashSet< T, H, E, A >::emplace ( const key_type arg)
inline

◆ emplace() [4/5]

template<typename T , typename H = std::hash<T>, typename E = std::equal_to<>, typename A = std::allocator<T>>
Pair< typename Table::iterator, bool > CeresEngine::FlatHashSet< T, H, E, A >::emplace ( key_type &&  arg)
inline

◆ emplace() [5/5]

template<typename T , typename H = std::hash<T>, typename E = std::equal_to<>, typename A = std::allocator<T>>
Pair< typename Table::iterator, bool > CeresEngine::FlatHashSet< T, H, E, A >::emplace ( key_type arg)
inline

Friends And Related Symbol Documentation

◆ operator!=

template<typename T , typename H = std::hash<T>, typename E = std::equal_to<>, typename A = std::allocator<T>>
bool operator!= ( const FlatHashSet< T, H, E, A > &  lhs,
const FlatHashSet< T, H, E, A > &  rhs 
)
friend

◆ operator==

template<typename T , typename H = std::hash<T>, typename E = std::equal_to<>, typename A = std::allocator<T>>
bool operator== ( const FlatHashSet< T, H, E, A > &  lhs,
const FlatHashSet< T, H, E, A > &  rhs 
)
friend

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