Blender  V3.3
Static Public Member Functions | List of all members
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 169 of file BLI_hash_tables.hh.

Member Function Documentation

◆ get_empty()

template<typename Key , Key EmptyValue, Key RemovedValue>
static 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 173 of file BLI_hash_tables.hh.

◆ is_empty()

template<typename Key , Key EmptyValue, Key RemovedValue>
static 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 189 of file BLI_hash_tables.hh.

◆ is_not_empty_or_removed()

template<typename Key , Key EmptyValue, Key RemovedValue>
static 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 205 of file BLI_hash_tables.hh.

◆ is_removed()

template<typename Key , Key EmptyValue, Key RemovedValue>
static 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 197 of file BLI_hash_tables.hh.

◆ remove()

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

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

Definition at line 181 of file BLI_hash_tables.hh.


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