Blender  V3.3
Public Member Functions | List of all members
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 UNUSED(hash)) const
 
template<typename ForwardKey >
void occupy (ForwardKey &&key, const uint64_t UNUSED(hash))
 
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 271 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   UNUSEDhash 
) const
inline

◆ get_hash()

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

◆ is_empty()

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

Definition at line 297 of file BLI_set_slots.hh.

◆ is_occupied()

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

◆ key() [1/2]

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

◆ key() [2/2]

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

Definition at line 287 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   UNUSEDhash 
)
inline

◆ remove()

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

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