Blender V5.0
blender::TemplatedKeyInfo< Key, EmptyValue, RemovedValue > Struct Template Reference

#include <BLI_hash_tables.hh>

Static Public Member Functions

static Key get_empty ()
static void remove (Key &key)
static bool is_empty (const Key &key)
static bool is_removed (const Key &key)
static bool is_not_empty_or_removed (const Key &key)

Detailed Description

template<typename Key, Key EmptyValue, Key RemovedValue>
struct blender::TemplatedKeyInfo< Key, EmptyValue, RemovedValue >

The template arguments EmptyValue and RemovedValue define which special are used. This can be used when a hash table has integer keys and there are two specific integers that will never be used as keys.

Definition at line 135 of file BLI_hash_tables.hh.

Member Function Documentation

◆ get_empty()

template<typename Key, Key EmptyValue, Key RemovedValue>
Key blender::TemplatedKeyInfo< Key, EmptyValue, RemovedValue >::get_empty ( )
inlinestatic

Get the value that indicates that the slot is empty. This is used to indicate new slots.

Definition at line 139 of file BLI_hash_tables.hh.

◆ is_empty()

template<typename Key, Key EmptyValue, Key RemovedValue>
bool blender::TemplatedKeyInfo< Key, EmptyValue, RemovedValue >::is_empty ( const Key & key)
inlinestatic

Return true, when the given key indicates that the slot is empty.

Definition at line 155 of file BLI_hash_tables.hh.

◆ is_not_empty_or_removed()

template<typename Key, Key EmptyValue, Key RemovedValue>
bool blender::TemplatedKeyInfo< Key, EmptyValue, RemovedValue >::is_not_empty_or_removed ( const Key & key)
inlinestatic

Return true, when the key is valid, i.e. it can be contained in an occupied slot.

Definition at line 171 of file BLI_hash_tables.hh.

◆ is_removed()

template<typename Key, Key EmptyValue, Key RemovedValue>
bool blender::TemplatedKeyInfo< Key, EmptyValue, RemovedValue >::is_removed ( const Key & key)
inlinestatic

Return true, when the given key indicates that the slot is removed.

Definition at line 163 of file BLI_hash_tables.hh.

◆ remove()

template<typename Key, Key EmptyValue, Key RemovedValue>
void blender::TemplatedKeyInfo< Key, EmptyValue, RemovedValue >::remove ( Key & key)
inlinestatic

Modify the given key so that it represents a removed slot.

Definition at line 147 of file BLI_hash_tables.hh.


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