Blender  V3.3
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 1256 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 1284 of file BLI_map.hh.

References Value.

◆ 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 1278 of file BLI_map.hh.

References Value.

◆ clear()

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

Definition at line 1311 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 1291 of file BLI_map.hh.

◆ is_empty()

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

Definition at line 1267 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 1301 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 1306 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 1316 of file BLI_map.hh.

◆ remove()

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

Definition at line 1296 of file BLI_map.hh.

◆ reserve()

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

Definition at line 1272 of file BLI_map.hh.

◆ size()

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

Definition at line 1262 of file BLI_map.hh.


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