Blender  V3.3
Public Member Functions | List of all members
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 &UNUSED(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 166 of file BLI_set_slots.hh.

Constructor & Destructor Documentation

◆ HashedSetSlot() [1/3]

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

Definition at line 179 of file BLI_set_slots.hh.

◆ ~HashedSetSlot()

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

Definition at line 184 of file BLI_set_slots.hh.

References blender::TypedBuffer< T, Size >::ref().

◆ HashedSetSlot() [2/3]

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

Definition at line 191 of file BLI_set_slots.hh.

◆ HashedSetSlot() [3/3]

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

Definition at line 200 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 236 of file BLI_set_slots.hh.

References hash, and blender::HashedSetSlot< Key >::key().

◆ get_hash()

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

Definition at line 229 of file BLI_set_slots.hh.

References BLI_assert, and blender::HashedSetSlot< Key >::is_occupied().

◆ is_empty()

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

Definition at line 224 of file BLI_set_slots.hh.

◆ is_occupied()

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

◆ key() [1/2]

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

◆ key() [2/2]

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

Definition at line 214 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

◆ remove()

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

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