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 = std::equal_to<>>
class hash_set< Value, Extractor, Hasher, Equal >

Definition at line 265 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 = std::equal_to<>>
using hash_set< Value, Extractor, Hasher, Equal >::const_iterator = Iter<const hash_set, const Value>

Definition at line 341 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 = std::equal_to<>>
using hash_set< Value, Extractor, Hasher, Equal >::iterator = Iter< hash_set, Value>

Definition at line 340 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 = std::equal_to<>>
using hash_set< Value, Extractor, Hasher, Equal >::value_type = Value

Definition at line 268 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 = std::equal_to<>>
hash_set< Value, Extractor, Hasher, Equal >::hash_set ( unsigned  initialSize = 0,
Extractor  extract_ = Extractor(),
Hasher  hasher_ = Hasher(),
Equal  equal_ = Equal() 
)
inlineexplicit

Definition at line 344 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 = std::equal_to<>>
hash_set< Value, Extractor, Hasher, Equal >::hash_set ( const hash_set< Value, Extractor, Hasher, Equal > &  source)
inline

Definition at line 353 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 = std::equal_to<>>
hash_set< Value, Extractor, Hasher, Equal >::hash_set ( hash_set< Value, Extractor, Hasher, Equal > &&  source)
inlinenoexcept

Definition at line 369 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 = std::equal_to<>>
hash_set< Value, Extractor, Hasher, Equal >::hash_set ( std::initializer_list< Value >  args)
inlineexplicit

Definition at line 383 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 = std::equal_to<>>
hash_set< Value, Extractor, Hasher, Equal >::~hash_set ( )
inline

Definition at line 389 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 = std::equal_to<>>
iterator hash_set< Value, Extractor, Hasher, Equal >::begin ( )
inline

Definition at line 557 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 = std::equal_to<>>
const_iterator hash_set< Value, Extractor, Hasher, Equal >::begin ( ) const
inline

Definition at line 570 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 = std::equal_to<>>
unsigned hash_set< Value, Extractor, Hasher, Equal >::capacity ( ) const
inline

Definition at line 593 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 = std::equal_to<>>
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 = std::equal_to<>>
template<typename K >
bool hash_set< Value, Extractor, Hasher, Equal >::contains ( const K &  key) const
inline

Definition at line 431 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 = std::equal_to<>>
template<typename... Args>
std::pair<iterator, bool> hash_set< Value, Extractor, Hasher, Equal >::emplace ( Args &&...  args)
inline

Definition at line 458 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 = std::equal_to<>>
template<typename... Args>
std::pair<iterator, bool> hash_set< Value, Extractor, Hasher, Equal >::emplace_noCapacityCheck ( Args &&...  args)
inline

Definition at line 463 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 = std::equal_to<>>
template<typename... Args>
iterator hash_set< Value, Extractor, Hasher, Equal >::emplace_noCapacityCheck_noDuplicateCheck ( Args &&...  args)
inline

Definition at line 473 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 = std::equal_to<>>
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 = std::equal_to<>>
bool hash_set< Value, Extractor, Hasher, Equal >::empty ( ) const
inline

Definition at line 520 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 = std::equal_to<>>
iterator hash_set< Value, Extractor, Hasher, Equal >::end ( )
inline

◆ end() [2/2]

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

Definition at line 588 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 = std::equal_to<>>
template<typename K >
bool hash_set< Value, Extractor, Hasher, Equal >::erase ( const K &  key)
inline

Definition at line 479 of file hash_set.hh.

Referenced by openmsx::UnmapHostFiles::onDirEntry().

◆ erase() [2/2]

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

Definition at line 500 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 = std::equal_to<>>
template<typename K >
iterator hash_set< Value, Extractor, Hasher, Equal >::find ( const K &  key)
inline

Definition at line 546 of file hash_set.hh.

Referenced by openmsx::InputArchiveBase2::resetSharedPtr().

◆ find() [2/2]

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

Definition at line 552 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 = std::equal_to<>>
template<typename V >
std::pair<iterator, bool> hash_set< Value, Extractor, Hasher, Equal >::insert ( V &&  value)
inline

Definition at line 437 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 = std::equal_to<>>
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 = std::equal_to<>>
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 = std::equal_to<>>
template<typename V >
iterator hash_set< Value, Extractor, Hasher, Equal >::insert_noDuplicateCheck ( V &&  value)
inline

Definition at line 447 of file hash_set.hh.

◆ operator=() [1/2]

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

Definition at line 395 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 = std::equal_to<>>
hash_set& hash_set< Value, Extractor, Hasher, Equal >::operator= ( hash_set< Value, Extractor, Hasher, Equal > &&  source)
inlinenoexcept

Definition at line 414 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 = std::equal_to<>>
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 = std::equal_to<>>
unsigned hash_set< Value, Extractor, Hasher, Equal >::size ( ) const
inline

Definition at line 525 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 = std::equal_to<>>
auto begin ( const hash_set< Value, Extractor, Hasher, Equal > &  s)
friend

Definition at line 635 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 = std::equal_to<>>
auto begin ( hash_set< Value, Extractor, Hasher, Equal > &  s)
friend

Definition at line 634 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 = std::equal_to<>>
auto end ( const hash_set< Value, Extractor, Hasher, Equal > &  s)
friend

Definition at line 637 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 = std::equal_to<>>
auto end ( hash_set< Value, Extractor, Hasher, Equal > &  s)
friend

Definition at line 636 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 = std::equal_to<>>
void swap ( hash_set< Value, Extractor, Hasher, Equal > &  x,
hash_set< Value, Extractor, Hasher, Equal > &  y 
)
friend

Definition at line 622 of file hash_set.hh.


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