Blender V5.0
blender::HashedSetSlot< Key > Class Template Reference

#include <BLI_set_slots.hh>

Public Member Functions

 HashedSetSlot ()
 ~HashedSetSlot ()
 HashedSetSlot (const HashedSetSlot &other)
 HashedSetSlot (HashedSetSlot &&other) noexcept(std::is_nothrow_move_constructible_v< Key >)
Keykey ()
const Keykey () const
bool is_occupied () const
bool is_empty () const
template<typename Hash>
uint64_t get_hash (const Hash &) const
template<typename ForwardKey, typename IsEqual>
bool contains (const ForwardKey &key, const IsEqual &is_equal, const uint64_t hash) const
template<typename ForwardKey>
void occupy (ForwardKey &&key, const uint64_t hash)
void remove ()

Detailed Description

template<typename Key>
class blender::HashedSetSlot< Key >

This set slot implementation stores the hash of the key within the slot. This helps when computing the hash or an equality check is expensive.

Definition at line 169 of file BLI_set_slots.hh.

Constructor & Destructor Documentation

◆ HashedSetSlot() [1/3]

template<typename Key>
blender::HashedSetSlot< Key >::HashedSetSlot ( )
inline

Definition at line 182 of file BLI_set_slots.hh.

◆ ~HashedSetSlot()

template<typename Key>
blender::HashedSetSlot< Key >::~HashedSetSlot ( )
inline

Definition at line 187 of file BLI_set_slots.hh.

◆ HashedSetSlot() [2/3]

template<typename Key>
blender::HashedSetSlot< Key >::HashedSetSlot ( const HashedSetSlot< Key > & other)
inline

Definition at line 194 of file BLI_set_slots.hh.

◆ HashedSetSlot() [3/3]

template<typename Key>
blender::HashedSetSlot< Key >::HashedSetSlot ( HashedSetSlot< Key > && other)
inlinenoexcept

Definition at line 203 of file BLI_set_slots.hh.

Member Function Documentation

◆ contains()

template<typename Key>
template<typename ForwardKey, typename IsEqual>
bool blender::HashedSetSlot< Key >::contains ( const ForwardKey & key,
const IsEqual & is_equal,
const uint64_t hash ) const
inline

Definition at line 239 of file BLI_set_slots.hh.

◆ get_hash()

template<typename Key>
template<typename Hash>
uint64_t blender::HashedSetSlot< Key >::get_hash ( const Hash & ) const
inline

Definition at line 232 of file BLI_set_slots.hh.

◆ is_empty()

template<typename Key>
bool blender::HashedSetSlot< Key >::is_empty ( ) const
inline

Definition at line 227 of file BLI_set_slots.hh.

◆ is_occupied()

◆ key() [1/2]

template<typename Key>
Key * blender::HashedSetSlot< Key >::key ( )
inline

Definition at line 212 of file BLI_set_slots.hh.

◆ key() [2/2]

template<typename Key>
const Key * blender::HashedSetSlot< Key >::key ( ) const
inline

Definition at line 217 of file BLI_set_slots.hh.

◆ occupy()

template<typename Key>
template<typename ForwardKey>
void blender::HashedSetSlot< Key >::occupy ( ForwardKey && key,
const uint64_t hash )
inline

Definition at line 250 of file BLI_set_slots.hh.

◆ remove()

template<typename Key>
void blender::HashedSetSlot< Key >::remove ( )
inline

Definition at line 258 of file BLI_set_slots.hh.


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