openMSX
Classes | Public Types | Public Member Functions | Friends | List of all members
hash_set< Value, Extractor, Hasher, Equal > Class Template Reference

#include <hash_set.hh>

Inheritance diagram for hash_set< Value, Extractor, Hasher, Equal >:
Inheritance graph
[legend]

Classes

class  Iter
 

Public Types

using value_type = Value
 
using iterator = Iter< hash_set, Value >
 
using const_iterator = Iter< const hash_set, const Value >
 

Public Member Functions

 hash_set (unsigned initialSize=0, Extractor extract_=Extractor(), Hasher hasher_=Hasher(), Equal equal_=Equal())
 
 hash_set (const hash_set &source)
 
 hash_set (hash_set &&source) noexcept
 
 hash_set (std::initializer_list< Value > args)
 
 ~hash_set ()
 
hash_setoperator= (const hash_set &source)
 
hash_setoperator= (hash_set &&source) noexcept
 
template<typename K >
bool contains (const K &key) const
 
template<typename V >
std::pair< iterator, bool > insert (V &&value)
 
template<typename V >
std::pair< iterator, bool > insert_noCapacityCheck (V &&value)
 
template<typename V >
iterator insert_noDuplicateCheck (V &&value)
 
template<typename V >
iterator insert_noCapacityCheck_noDuplicateCheck (V &&value)
 
template<typename... Args>
std::pair< iterator, bool > emplace (Args &&... args)
 
template<typename... Args>
std::pair< iterator, bool > emplace_noCapacityCheck (Args &&... args)
 
template<typename... Args>
iterator emplace_noDuplicateCheck (Args &&... args)
 
template<typename... Args>
iterator emplace_noCapacityCheck_noDuplicateCheck (Args &&... args)
 
template<typename K >
bool erase (const K &key)
 
void erase (iterator it)
 
bool empty () const
 
unsigned size () const
 
void clear ()
 
template<typename K >
iterator find (const K &key)
 
template<typename K >
const_iterator find (const K &key) const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
unsigned capacity () const
 
void reserve (unsigned count)
 

Friends

void swap (hash_set &x, hash_set &y) noexcept
 
auto begin (hash_set &s)
 
auto begin (const hash_set &s)
 
auto end (hash_set &s)
 
auto end (const hash_set &s)
 

Detailed Description

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
class hash_set< Value, Extractor, Hasher, Equal >

Definition at line 284 of file hash_set.hh.

Member Typedef Documentation

◆ const_iterator

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
using hash_set< Value, Extractor, Hasher, Equal >::const_iterator = Iter<const hash_set, const Value>

Definition at line 360 of file hash_set.hh.

◆ iterator

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
using hash_set< Value, Extractor, Hasher, Equal >::iterator = Iter< hash_set, Value>

Definition at line 359 of file hash_set.hh.

◆ value_type

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
using hash_set< Value, Extractor, Hasher, Equal >::value_type = Value

Definition at line 287 of file hash_set.hh.

Constructor & Destructor Documentation

◆ hash_set() [1/4]

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
hash_set< Value, Extractor, Hasher, Equal >::hash_set ( unsigned  initialSize = 0,
Extractor  extract_ = Extractor(),
Hasher  hasher_ = Hasher(),
Equal  equal_ = Equal() 
)
inlineexplicit

Definition at line 363 of file hash_set.hh.

◆ hash_set() [2/4]

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
hash_set< Value, Extractor, Hasher, Equal >::hash_set ( const hash_set< Value, Extractor, Hasher, Equal > &  source)
inline

Definition at line 372 of file hash_set.hh.

◆ hash_set() [3/4]

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
hash_set< Value, Extractor, Hasher, Equal >::hash_set ( hash_set< Value, Extractor, Hasher, Equal > &&  source)
inlinenoexcept

Definition at line 388 of file hash_set.hh.

◆ hash_set() [4/4]

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
hash_set< Value, Extractor, Hasher, Equal >::hash_set ( std::initializer_list< Value >  args)
inlineexplicit

Definition at line 402 of file hash_set.hh.

◆ ~hash_set()

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
hash_set< Value, Extractor, Hasher, Equal >::~hash_set ( )
inline

Definition at line 408 of file hash_set.hh.

Member Function Documentation

◆ begin() [1/2]

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
iterator hash_set< Value, Extractor, Hasher, Equal >::begin ( )
inline

Definition at line 576 of file hash_set.hh.

◆ begin() [2/2]

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
const_iterator hash_set< Value, Extractor, Hasher, Equal >::begin ( ) const
inline

Definition at line 589 of file hash_set.hh.

◆ capacity()

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
unsigned hash_set< Value, Extractor, Hasher, Equal >::capacity ( ) const
inline

Definition at line 612 of file hash_set.hh.

◆ clear()

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
void hash_set< Value, Extractor, Hasher, Equal >::clear ( )
inline

◆ contains()

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
template<typename K >
bool hash_set< Value, Extractor, Hasher, Equal >::contains ( const K &  key) const
inline

Definition at line 450 of file hash_set.hh.

◆ emplace()

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
template<typename... Args>
std::pair<iterator, bool> hash_set< Value, Extractor, Hasher, Equal >::emplace ( Args &&...  args)
inline

Definition at line 477 of file hash_set.hh.

◆ emplace_noCapacityCheck()

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
template<typename... Args>
std::pair<iterator, bool> hash_set< Value, Extractor, Hasher, Equal >::emplace_noCapacityCheck ( Args &&...  args)
inline

Definition at line 482 of file hash_set.hh.

◆ emplace_noCapacityCheck_noDuplicateCheck()

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
template<typename... Args>
iterator hash_set< Value, Extractor, Hasher, Equal >::emplace_noCapacityCheck_noDuplicateCheck ( Args &&...  args)
inline

Definition at line 492 of file hash_set.hh.

◆ emplace_noDuplicateCheck()

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
template<typename... Args>
iterator hash_set< Value, Extractor, Hasher, Equal >::emplace_noDuplicateCheck ( Args &&...  args)
inline

◆ empty()

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
bool hash_set< Value, Extractor, Hasher, Equal >::empty ( ) const
inline

Definition at line 539 of file hash_set.hh.

Referenced by openmsx::RomDatabase::RomDatabase().

◆ end() [1/2]

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
iterator hash_set< Value, Extractor, Hasher, Equal >::end ( )
inline

Definition at line 602 of file hash_set.hh.

◆ end() [2/2]

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
const_iterator hash_set< Value, Extractor, Hasher, Equal >::end ( ) const
inline

Definition at line 607 of file hash_set.hh.

◆ erase() [1/2]

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
template<typename K >
bool hash_set< Value, Extractor, Hasher, Equal >::erase ( const K &  key)
inline

Definition at line 498 of file hash_set.hh.

Referenced by openmsx::CompressedFileAdapter::~CompressedFileAdapter().

◆ erase() [2/2]

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
void hash_set< Value, Extractor, Hasher, Equal >::erase ( iterator  it)
inline

Definition at line 519 of file hash_set.hh.

◆ find() [1/2]

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
template<typename K >
iterator hash_set< Value, Extractor, Hasher, Equal >::find ( const K &  key)
inline

Definition at line 565 of file hash_set.hh.

Referenced by openmsx::CompressedFileAdapter::~CompressedFileAdapter().

◆ find() [2/2]

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
template<typename K >
const_iterator hash_set< Value, Extractor, Hasher, Equal >::find ( const K &  key) const
inline

Definition at line 571 of file hash_set.hh.

◆ insert()

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
template<typename V >
std::pair<iterator, bool> hash_set< Value, Extractor, Hasher, Equal >::insert ( V &&  value)
inline

Definition at line 456 of file hash_set.hh.

◆ insert_noCapacityCheck()

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
template<typename V >
std::pair<iterator, bool> hash_set< Value, Extractor, Hasher, Equal >::insert_noCapacityCheck ( V &&  value)
inline

◆ insert_noCapacityCheck_noDuplicateCheck()

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
template<typename V >
iterator hash_set< Value, Extractor, Hasher, Equal >::insert_noCapacityCheck_noDuplicateCheck ( V &&  value)
inline

◆ insert_noDuplicateCheck()

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
template<typename V >
iterator hash_set< Value, Extractor, Hasher, Equal >::insert_noDuplicateCheck ( V &&  value)
inline

Definition at line 466 of file hash_set.hh.

Referenced by openmsx::CompressedFileAdapter::~CompressedFileAdapter().

◆ operator=() [1/2]

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
hash_set& hash_set< Value, Extractor, Hasher, Equal >::operator= ( const hash_set< Value, Extractor, Hasher, Equal > &  source)
inline

Definition at line 414 of file hash_set.hh.

◆ operator=() [2/2]

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
hash_set& hash_set< Value, Extractor, Hasher, Equal >::operator= ( hash_set< Value, Extractor, Hasher, Equal > &&  source)
inlinenoexcept

Definition at line 433 of file hash_set.hh.

◆ reserve()

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
void hash_set< Value, Extractor, Hasher, Equal >::reserve ( unsigned  count)
inline

◆ size()

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
unsigned hash_set< Value, Extractor, Hasher, Equal >::size ( ) const
inline

Definition at line 544 of file hash_set.hh.

Friends And Related Function Documentation

◆ begin [1/2]

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
auto begin ( hash_set< Value, Extractor, Hasher, Equal > &  s)
friend

Definition at line 653 of file hash_set.hh.

◆ begin [2/2]

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
auto begin ( const hash_set< Value, Extractor, Hasher, Equal > &  s)
friend

Definition at line 654 of file hash_set.hh.

◆ end [1/2]

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
auto end ( hash_set< Value, Extractor, Hasher, Equal > &  s)
friend

Definition at line 655 of file hash_set.hh.

◆ end [2/2]

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
auto end ( const hash_set< Value, Extractor, Hasher, Equal > &  s)
friend

Definition at line 656 of file hash_set.hh.

◆ swap

template<typename Value, typename Extractor = hash_set_impl::Identity, typename Hasher = std::hash<hash_set_impl::ExtractedType<Value, Extractor>>, typename Equal = EqualTo>
void swap ( hash_set< Value, Extractor, Hasher, Equal > &  x,
hash_set< Value, Extractor, Hasher, Equal > &  y 
)
friend

Definition at line 641 of file hash_set.hh.


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