Blender  V3.3
Public Types | Public Member Functions | List of all members
blender::MultiValueMap< Key, Value > Class Template Reference

#include <BLI_multi_value_map.hh>

Public Types

using size_type = int64_t
 

Public Member Functions

void add (const Key &key, const Value &value)
 
void add (const Key &key, Value &&value)
 
void add (Key &&key, const Value &value)
 
void add (Key &&key, Value &&value)
 
template<typename ForwardKey , typename ForwardValue >
void add_as (ForwardKey &&key, ForwardValue &&value)
 
void add_non_duplicates (const Key &key, const Value &value)
 
void add_multiple (const Key &key, Span< Value > values)
 
void add_multiple (Key &&key, Span< Value > values)
 
template<typename ForwardKey >
void add_multiple_as (ForwardKey &&key, Span< Value > values)
 
Span< Value > lookup (const Key &key) const
 
template<typename ForwardKey >
Span< Value > lookup_as (const ForwardKey &key) const
 
MutableSpan< Value > lookup (const Key &key)
 
template<typename ForwardKey >
MutableSpan< Value > lookup_as (const ForwardKey &key)
 
MapType::ItemIterator items () const
 
MapType::KeyIterator keys () const
 
MapType::ValueIterator values () const
 

Detailed Description

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

Definition at line 26 of file BLI_multi_value_map.hh.

Member Typedef Documentation

◆ size_type

template<typename Key , typename Value >
using blender::MultiValueMap< Key, Value >::size_type = int64_t

Definition at line 28 of file BLI_multi_value_map.hh.

Member Function Documentation

◆ add() [1/4]

template<typename Key , typename Value >
void blender::MultiValueMap< Key, Value >::add ( const Key key,
const Value &  value 
)
inline

Add a new value for the given key. If the map contains the key already, the value will be appended to the list of corresponding values.

Definition at line 39 of file BLI_multi_value_map.hh.

References blender::MultiValueMap< Key, Value >::add_as().

Referenced by BLI_string_search_query(), blender::nodes::node_geo_curve_sample_cc::SampleCurveFunction::call(), blender::compositor::NodeOperationBuilder::convert_to_operations(), find_output_attributes_to_store(), and ntree_update_reroute_nodes().

◆ add() [2/4]

template<typename Key , typename Value >
void blender::MultiValueMap< Key, Value >::add ( const Key key,
Value &&  value 
)
inline

◆ add() [3/4]

template<typename Key , typename Value >
void blender::MultiValueMap< Key, Value >::add ( Key &&  key,
const Value &  value 
)
inline

◆ add() [4/4]

template<typename Key , typename Value >
void blender::MultiValueMap< Key, Value >::add ( Key &&  key,
Value &&  value 
)
inline

◆ add_as()

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

◆ add_multiple() [1/2]

template<typename Key , typename Value >
void blender::MultiValueMap< Key, Value >::add_multiple ( const Key key,
Span< Value >  values 
)
inline

◆ add_multiple() [2/2]

template<typename Key , typename Value >
void blender::MultiValueMap< Key, Value >::add_multiple ( Key &&  key,
Span< Value >  values 
)
inline

◆ add_multiple_as()

template<typename Key , typename Value >
template<typename ForwardKey >
void blender::MultiValueMap< Key, Value >::add_multiple_as ( ForwardKey &&  key,
Span< Value >  values 
)
inline

◆ add_non_duplicates()

template<typename Key , typename Value >
void blender::MultiValueMap< Key, Value >::add_non_duplicates ( const Key key,
const Value &  value 
)
inline

◆ items()

template<typename Key , typename Value >
MapType::ItemIterator blender::MultiValueMap< Key, Value >::items ( ) const
inline

NOTE: This signature will change when the implementation changes.

Definition at line 120 of file BLI_multi_value_map.hh.

References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items().

Referenced by compute_attributes_to_store().

◆ keys()

template<typename Key , typename Value >
MapType::KeyIterator blender::MultiValueMap< Key, Value >::keys ( ) const
inline

◆ lookup() [1/2]

template<typename Key , typename Value >
MutableSpan<Value> blender::MultiValueMap< Key, Value >::lookup ( const Key key)
inline

Get a mutable span to all the values that are stored for the given key.

Definition at line 104 of file BLI_multi_value_map.hh.

References blender::MultiValueMap< Key, Value >::lookup_as().

◆ lookup() [2/2]

template<typename Key , typename Value >
Span<Value> blender::MultiValueMap< Key, Value >::lookup ( const Key key) const
inline

◆ lookup_as() [1/2]

template<typename Key , typename Value >
template<typename ForwardKey >
MutableSpan<Value> blender::MultiValueMap< Key, Value >::lookup_as ( const ForwardKey &  key)
inline

◆ lookup_as() [2/2]

template<typename Key , typename Value >
template<typename ForwardKey >
Span<Value> blender::MultiValueMap< Key, Value >::lookup_as ( const ForwardKey &  key) const
inline

◆ values()

template<typename Key , typename Value >
MapType::ValueIterator blender::MultiValueMap< Key, Value >::values ( ) const
inline

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