Blender
V3.3
|
#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 | |
Key * | key () |
const Key * | key () 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 () |
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.
|
default |
|
default |
|
default |
|
defaultnoexcept |
|
inline |
Definition at line 309 of file BLI_set_slots.hh.
References BLI_assert, and blender::IntrusiveSetSlot< Key, KeyInfo >::key().
|
inline |
Definition at line 302 of file BLI_set_slots.hh.
References BLI_assert, hash, and blender::IntrusiveSetSlot< Key, KeyInfo >::is_occupied().
|
inline |
Definition at line 297 of file BLI_set_slots.hh.
|
inline |
Definition at line 292 of file BLI_set_slots.hh.
Referenced by blender::IntrusiveSetSlot< Key, KeyInfo >::get_hash(), blender::IntrusiveSetSlot< Key, KeyInfo >::occupy(), and blender::IntrusiveSetSlot< Key, KeyInfo >::remove().
|
inline |
Definition at line 282 of file BLI_set_slots.hh.
Referenced by blender::IntrusiveSetSlot< Key, KeyInfo >::contains(), and blender::IntrusiveSetSlot< Key, KeyInfo >::occupy().
|
inline |
Definition at line 287 of file BLI_set_slots.hh.
|
inline |
Definition at line 315 of file BLI_set_slots.hh.
References BLI_assert, blender::IntrusiveSetSlot< Key, KeyInfo >::is_occupied(), and blender::IntrusiveSetSlot< Key, KeyInfo >::key().
|
inline |
Definition at line 322 of file BLI_set_slots.hh.
References BLI_assert, blender::IntrusiveSetSlot< Key, KeyInfo >::is_occupied(), and blender::bke::attribute_accessor_functions::remove().