Blender V5.0
blender::IntrusiveSetSlot< Key, KeyInfo > Class Template Reference

#include <BLI_set_slots.hh>

Public Member Functions

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

Detailed Description

template<typename Key, typename KeyInfo>
class blender::IntrusiveSetSlot< Key, KeyInfo >

An IntrusiveSetSlot uses two special values of the key to indicate whether the slot is empty or removed. This saves some memory in all cases and is more efficient in many cases. The KeyInfo type indicates which specific values are used. An example for a KeyInfo implementation is PointerKeyInfo.

The special key values are expected to be trivially destructible.

Definition at line 274 of file BLI_set_slots.hh.

Constructor & Destructor Documentation

◆ IntrusiveSetSlot() [1/3]

template<typename Key, typename KeyInfo>
blender::IntrusiveSetSlot< Key, KeyInfo >::IntrusiveSetSlot ( )
default

◆ ~IntrusiveSetSlot()

template<typename Key, typename KeyInfo>
blender::IntrusiveSetSlot< Key, KeyInfo >::~IntrusiveSetSlot ( )
default

◆ IntrusiveSetSlot() [2/3]

template<typename Key, typename KeyInfo>
blender::IntrusiveSetSlot< Key, KeyInfo >::IntrusiveSetSlot ( const IntrusiveSetSlot< Key, KeyInfo > & other)
default

◆ IntrusiveSetSlot() [3/3]

template<typename Key, typename KeyInfo>
blender::IntrusiveSetSlot< Key, KeyInfo >::IntrusiveSetSlot ( IntrusiveSetSlot< Key, KeyInfo > && other) const
defaultnoexcept

Member Function Documentation

◆ contains()

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

Definition at line 312 of file BLI_set_slots.hh.

◆ get_hash()

template<typename Key, typename KeyInfo>
template<typename Hash>
uint64_t blender::IntrusiveSetSlot< Key, KeyInfo >::get_hash ( const Hash & hash) const
inline

Definition at line 305 of file BLI_set_slots.hh.

◆ is_empty()

template<typename Key, typename KeyInfo>
bool blender::IntrusiveSetSlot< Key, KeyInfo >::is_empty ( ) const
inline

Definition at line 300 of file BLI_set_slots.hh.

◆ is_occupied()

◆ key() [1/2]

template<typename Key, typename KeyInfo>
Key * blender::IntrusiveSetSlot< Key, KeyInfo >::key ( )
inline

Definition at line 285 of file BLI_set_slots.hh.

◆ key() [2/2]

template<typename Key, typename KeyInfo>
const Key * blender::IntrusiveSetSlot< Key, KeyInfo >::key ( ) const
inline

Definition at line 290 of file BLI_set_slots.hh.

◆ occupy()

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

Definition at line 318 of file BLI_set_slots.hh.

◆ remove()

template<typename Key, typename KeyInfo>
void blender::IntrusiveSetSlot< Key, KeyInfo >::remove ( )
inline

Definition at line 325 of file BLI_set_slots.hh.


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