Blender V4.3
blender::PointerKeyInfo< Pointer > Struct Template Reference

#include <BLI_hash_tables.hh>

Static Public Member Functions

static Pointer get_empty ()
 
static void remove (Pointer &pointer)
 
static bool is_empty (Pointer pointer)
 
static bool is_removed (Pointer pointer)
 
static bool is_not_empty_or_removed (Pointer pointer)
 

Detailed Description

template<typename Pointer>
struct blender::PointerKeyInfo< Pointer >

0xffff...ffff indicates an empty slot. 0xffff...fffe indicates a removed slot.

Those specific values are used, because with them a single comparison is enough to check whether a slot is occupied. The keys 0x0000...0000 and 0x0000...0001 also satisfy this constraint. However, nullptr is much more likely to be used as valid key.

Definition at line 187 of file BLI_hash_tables.hh.

Member Function Documentation

◆ get_empty()

template<typename Pointer >
static Pointer blender::PointerKeyInfo< Pointer >::get_empty ( )
inlinestatic

Definition at line 188 of file BLI_hash_tables.hh.

References UINTPTR_MAX.

◆ is_empty()

template<typename Pointer >
static bool blender::PointerKeyInfo< Pointer >::is_empty ( Pointer pointer)
inlinestatic

Definition at line 198 of file BLI_hash_tables.hh.

References UINTPTR_MAX.

◆ is_not_empty_or_removed()

template<typename Pointer >
static bool blender::PointerKeyInfo< Pointer >::is_not_empty_or_removed ( Pointer pointer)
inlinestatic

Definition at line 208 of file BLI_hash_tables.hh.

References UINTPTR_MAX.

◆ is_removed()

template<typename Pointer >
static bool blender::PointerKeyInfo< Pointer >::is_removed ( Pointer pointer)
inlinestatic

Definition at line 203 of file BLI_hash_tables.hh.

References UINTPTR_MAX.

◆ remove()

template<typename Pointer >
static void blender::PointerKeyInfo< Pointer >::remove ( Pointer & pointer)
inlinestatic

Definition at line 193 of file BLI_hash_tables.hh.

References UINTPTR_MAX.


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