|
Blender
V2.93
|
#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, ForwardValue &&value, uint64_t hash) |
| 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 246 of file BLI_map_slots.hh.
|
default |
|
inline |
Definition at line 254 of file BLI_map_slots.hh.
References blender::TypedBuffer< T, Size >::ref().
|
inline |
Definition at line 261 of file BLI_map_slots.hh.
References Value.
|
inlinenoexcept |
Definition at line 268 of file BLI_map_slots.hh.
References Value.
|
inline |
Definition at line 312 of file BLI_map_slots.hh.
References BLI_assert, and blender::IntrusiveMapSlot< Key, Value, KeyInfo >::key().
|
inline |
Definition at line 305 of file BLI_map_slots.hh.
References BLI_assert, hash, and blender::IntrusiveMapSlot< Key, Value, KeyInfo >::is_occupied().
|
inline |
Definition at line 300 of file BLI_map_slots.hh.
|
inline |
Definition at line 295 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 275 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 280 of file BLI_map_slots.hh.
|
inline |
Definition at line 319 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 327 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 340 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 285 of file BLI_map_slots.hh.
References Value.
Referenced by blender::IntrusiveMapSlot< Key, Value, KeyInfo >::occupy().
|
inline |
Definition at line 290 of file BLI_map_slots.hh.
References Value.