|
Blender V4.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) 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) |
| 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 234 of file BLI_map_slots.hh.
|
default |
|
inline |
Definition at line 242 of file BLI_map_slots.hh.
References blender::TypedBuffer< T, Size >::ref().
|
inline |
Definition at line 249 of file BLI_map_slots.hh.
References Value.
|
inlinenoexcept |
Definition at line 256 of file BLI_map_slots.hh.
References Value.
|
inline |
Definition at line 300 of file BLI_map_slots.hh.
References BLI_assert, and blender::IntrusiveMapSlot< Key, Value, KeyInfo >::key().
|
inline |
Definition at line 293 of file BLI_map_slots.hh.
References BLI_assert, hash, and blender::IntrusiveMapSlot< Key, Value, KeyInfo >::is_occupied().
|
inline |
Definition at line 288 of file BLI_map_slots.hh.
|
inline |
Definition at line 283 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 263 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 268 of file BLI_map_slots.hh.
|
inline |
Definition at line 307 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(), and Value.
|
inline |
Definition at line 315 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 328 of file BLI_map_slots.hh.
References BLI_assert, blender::IntrusiveMapSlot< Key, Value, KeyInfo >::is_occupied(), and blender::TypedBuffer< T, Size >::ref().
|
inline |
Definition at line 273 of file BLI_map_slots.hh.
|
inline |
Definition at line 278 of file BLI_map_slots.hh.