Blender
V3.3
|
#include <BLI_map_slots.hh>
Public Member Functions | |
IntrusiveMapSlot ()=default | |
~IntrusiveMapSlot () | |
IntrusiveMapSlot (const IntrusiveMapSlot &other) | |
IntrusiveMapSlot (IntrusiveMapSlot &&other) noexcept | |
Key * | key () |
const Key * | key () const |
Value * | value () |
const Value * | value () const |
bool | is_occupied () const |
bool | is_empty () const |
template<typename Hash > | |
uint64_t | get_hash (const Hash &hash) |
template<typename ForwardKey , typename IsEqual > | |
bool | contains (const ForwardKey &key, const IsEqual &is_equal, uint64_t UNUSED(hash)) const |
template<typename ForwardKey , typename... ForwardValue> | |
void | occupy (ForwardKey &&key, uint64_t hash, ForwardValue &&...value) |
template<typename ForwardKey > | |
void | occupy_no_value (ForwardKey &&key, uint64_t UNUSED(hash)) |
void | remove () |
An IntrusiveMapSlot 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 232 of file BLI_map_slots.hh.
|
default |
|
inline |
Definition at line 240 of file BLI_map_slots.hh.
References blender::TypedBuffer< T, Size >::ref().
|
inline |
Definition at line 247 of file BLI_map_slots.hh.
References Value.
|
inlinenoexcept |
Definition at line 254 of file BLI_map_slots.hh.
References Value.
|
inline |
Definition at line 298 of file BLI_map_slots.hh.
References BLI_assert, and blender::IntrusiveMapSlot< Key, Value, KeyInfo >::key().
|
inline |
Definition at line 291 of file BLI_map_slots.hh.
References BLI_assert, hash, and blender::IntrusiveMapSlot< Key, Value, KeyInfo >::is_occupied().
|
inline |
Definition at line 286 of file BLI_map_slots.hh.
|
inline |
Definition at line 281 of file BLI_map_slots.hh.
Referenced by blender::IntrusiveMapSlot< Key, Value, KeyInfo >::get_hash(), blender::IntrusiveMapSlot< Key, Value, KeyInfo >::occupy(), blender::IntrusiveMapSlot< Key, Value, KeyInfo >::occupy_no_value(), and blender::IntrusiveMapSlot< Key, Value, KeyInfo >::remove().
|
inline |
Definition at line 261 of file BLI_map_slots.hh.
Referenced by blender::IntrusiveMapSlot< Key, Value, KeyInfo >::contains(), blender::IntrusiveMapSlot< Key, Value, KeyInfo >::occupy(), and blender::IntrusiveMapSlot< Key, Value, KeyInfo >::occupy_no_value().
|
inline |
Definition at line 266 of file BLI_map_slots.hh.
|
inline |
Definition at line 305 of file BLI_map_slots.hh.
References BLI_assert, hash, blender::IntrusiveMapSlot< Key, Value, KeyInfo >::is_occupied(), blender::IntrusiveMapSlot< Key, Value, KeyInfo >::key(), blender::IntrusiveMapSlot< Key, Value, KeyInfo >::occupy_no_value(), blender::IntrusiveMapSlot< Key, Value, KeyInfo >::value(), and Value.
|
inline |
Definition at line 313 of file BLI_map_slots.hh.
References BLI_assert, blender::IntrusiveMapSlot< Key, Value, KeyInfo >::is_occupied(), blender::IntrusiveMapSlot< Key, Value, KeyInfo >::key(), and blender::TypedBuffer< T, Size >::ref().
Referenced by blender::IntrusiveMapSlot< Key, Value, KeyInfo >::occupy().
|
inline |
Definition at line 326 of file BLI_map_slots.hh.
References BLI_assert, blender::IntrusiveMapSlot< Key, Value, KeyInfo >::is_occupied(), blender::TypedBuffer< T, Size >::ref(), and blender::bke::attribute_accessor_functions::remove().
|
inline |
Definition at line 271 of file BLI_map_slots.hh.
References Value.
Referenced by blender::IntrusiveMapSlot< Key, Value, KeyInfo >::occupy().
|
inline |
Definition at line 276 of file BLI_map_slots.hh.
References Value.