Blender  V2.93
Public Member Functions | List of all members
blender::StdUnorderedMapWrapper< Key, Value > Class Template Reference

#include <BLI_map.hh>

Public Member Functions

int64_t size () const
 
bool is_empty () const
 
void reserve (int64_t n)
 
template<typename ForwardKey , typename ForwardValue >
void add_new (ForwardKey &&key, ForwardValue &&value)
 
template<typename ForwardKey , typename ForwardValue >
bool add (ForwardKey &&key, ForwardValue &&value)
 
bool contains (const Key &key) const
 
bool remove (const Key &key)
 
Value & lookup (const Key &key)
 
const Value & lookup (const Key &key) const
 
void clear ()
 
void print_stats (StringRef UNUSED(name)="") const
 

Detailed Description

template<typename Key, typename Value>
class blender::StdUnorderedMapWrapper< Key, Value >

A wrapper for std::unordered_map with the API of blender::Map. This can be used for benchmarking.

Definition at line 1203 of file BLI_map.hh.

Member Function Documentation

◆ add()

template<typename Key , typename Value >
template<typename ForwardKey , typename ForwardValue >
bool blender::StdUnorderedMapWrapper< Key, Value >::add ( ForwardKey &&  key,
ForwardValue &&  value 
)
inline

Definition at line 1231 of file BLI_map.hh.

◆ add_new()

template<typename Key , typename Value >
template<typename ForwardKey , typename ForwardValue >
void blender::StdUnorderedMapWrapper< Key, Value >::add_new ( ForwardKey &&  key,
ForwardValue &&  value 
)
inline

Definition at line 1225 of file BLI_map.hh.

◆ clear()

template<typename Key , typename Value >
void blender::StdUnorderedMapWrapper< Key, Value >::clear ( )
inline

Definition at line 1256 of file BLI_map.hh.

◆ contains()

template<typename Key , typename Value >
bool blender::StdUnorderedMapWrapper< Key, Value >::contains ( const Key key) const
inline

Definition at line 1236 of file BLI_map.hh.

◆ is_empty()

template<typename Key , typename Value >
bool blender::StdUnorderedMapWrapper< Key, Value >::is_empty ( ) const
inline

Definition at line 1214 of file BLI_map.hh.

◆ lookup() [1/2]

template<typename Key , typename Value >
Value& blender::StdUnorderedMapWrapper< Key, Value >::lookup ( const Key key)
inline

Definition at line 1246 of file BLI_map.hh.

References Value.

◆ lookup() [2/2]

template<typename Key , typename Value >
const Value& blender::StdUnorderedMapWrapper< Key, Value >::lookup ( const Key key) const
inline

Definition at line 1251 of file BLI_map.hh.

References Value.

◆ print_stats()

template<typename Key , typename Value >
void blender::StdUnorderedMapWrapper< Key, Value >::print_stats ( StringRef   UNUSEDname = "") const
inline

Definition at line 1261 of file BLI_map.hh.

◆ remove()

template<typename Key , typename Value >
bool blender::StdUnorderedMapWrapper< Key, Value >::remove ( const Key key)
inline

Definition at line 1241 of file BLI_map.hh.

◆ reserve()

template<typename Key , typename Value >
void blender::StdUnorderedMapWrapper< Key, Value >::reserve ( int64_t  n)
inline

Definition at line 1219 of file BLI_map.hh.

◆ size()

template<typename Key , typename Value >
int64_t blender::StdUnorderedMapWrapper< Key, Value >::size ( ) const
inline

Definition at line 1209 of file BLI_map.hh.


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