Blender V4.3
blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > Class Template Reference

#include <BLI_map.hh>

Classes

struct  BaseIterator
 
class  BaseIteratorRange
 
class  ItemIterator
 
class  KeyIterator
 
class  MutableItemIterator
 
class  MutableValueIterator
 
class  ValueIterator
 

Public Types

using size_type = int64_t
 
using Item = MapItem<Key, Value>
 
using MutableItem = MutableMapItem<Key, Value>
 

Public Member Functions

 Map (Allocator allocator={}) noexcept
 
 Map (NoExceptConstructor, Allocator allocator={}) noexcept
 
 ~Map ()=default
 
 Map (const Map &other)=default
 
 Map (Map &&other) noexcept(std::is_nothrow_move_constructible_v< SlotArray >)
 
Mapoperator= (const Map &other)
 
Mapoperator= (Map &&other)
 
void add_new (const Key &key, const Value &value)
 
void add_new (const Key &key, Value &&value)
 
void add_new (Key &&key, const Value &value)
 
void add_new (Key &&key, Value &&value)
 
template<typename ForwardKey , typename... ForwardValue>
void add_new_as (ForwardKey &&key, ForwardValue &&...value)
 
bool add (const Key &key, const Value &value)
 
bool add (const Key &key, Value &&value)
 
bool add (Key &&key, const Value &value)
 
bool add (Key &&key, Value &&value)
 
template<typename ForwardKey , typename... ForwardValue>
bool add_as (ForwardKey &&key, ForwardValue &&...value)
 
bool add_overwrite (const Key &key, const Value &value)
 
bool add_overwrite (const Key &key, Value &&value)
 
bool add_overwrite (Key &&key, const Value &value)
 
bool add_overwrite (Key &&key, Value &&value)
 
template<typename ForwardKey , typename... ForwardValue>
bool add_overwrite_as (ForwardKey &&key, ForwardValue &&...value)
 
bool contains (const Key &key) const
 
template<typename ForwardKey >
bool contains_as (const ForwardKey &key) const
 
bool remove (const Key &key)
 
template<typename ForwardKey >
bool remove_as (const ForwardKey &key)
 
void remove_contained (const Key &key)
 
template<typename ForwardKey >
void remove_contained_as (const ForwardKey &key)
 
Value pop (const Key &key)
 
template<typename ForwardKey >
Value pop_as (const ForwardKey &key)
 
std::optional< Value > pop_try (const Key &key)
 
template<typename ForwardKey >
std::optional< Value > pop_try_as (const ForwardKey &key)
 
Value pop_default (const Key &key, const Value &default_value)
 
Value pop_default (const Key &key, Value &&default_value)
 
template<typename ForwardKey , typename... ForwardValue>
Value pop_default_as (const ForwardKey &key, ForwardValue &&...default_value)
 
template<typename CreateValueF , typename ModifyValueF >
auto add_or_modify (const Key &key, const CreateValueF &create_value, const ModifyValueF &modify_value) -> decltype(create_value(nullptr))
 
template<typename CreateValueF , typename ModifyValueF >
auto add_or_modify (Key &&key, const CreateValueF &create_value, const ModifyValueF &modify_value) -> decltype(create_value(nullptr))
 
template<typename ForwardKey , typename CreateValueF , typename ModifyValueF >
auto add_or_modify_as (ForwardKey &&key, const CreateValueF &create_value, const ModifyValueF &modify_value) -> decltype(create_value(nullptr))
 
const Value * lookup_ptr (const Key &key) const
 
Value * lookup_ptr (const Key &key)
 
template<typename ForwardKey >
const Value * lookup_ptr_as (const ForwardKey &key) const
 
template<typename ForwardKey >
Value * lookup_ptr_as (const ForwardKey &key)
 
const Value & lookup (const Key &key) const
 
Value & lookup (const Key &key)
 
template<typename ForwardKey >
const Value & lookup_as (const ForwardKey &key) const
 
template<typename ForwardKey >
Value & lookup_as (const ForwardKey &key)
 
Value lookup_default (const Key &key, const Value &default_value) const
 
template<typename ForwardKey , typename... ForwardValue>
Value lookup_default_as (const ForwardKey &key, ForwardValue &&...default_value) const
 
Value & lookup_or_add (const Key &key, const Value &value)
 
Value & lookup_or_add (const Key &key, Value &&value)
 
Value & lookup_or_add (Key &&key, const Value &value)
 
Value & lookup_or_add (Key &&key, Value &&value)
 
template<typename ForwardKey , typename... ForwardValue>
Value & lookup_or_add_as (ForwardKey &&key, ForwardValue &&...value)
 
template<typename CreateValueF >
Value & lookup_or_add_cb (const Key &key, const CreateValueF &create_value)
 
template<typename CreateValueF >
Value & lookup_or_add_cb (Key &&key, const CreateValueF &create_value)
 
template<typename ForwardKey , typename CreateValueF >
Value & lookup_or_add_cb_as (ForwardKey &&key, const CreateValueF &create_value)
 
Value & lookup_or_add_default (const Key &key)
 
Value & lookup_or_add_default (Key &&key)
 
template<typename ForwardKey >
Value & lookup_or_add_default_as (ForwardKey &&key)
 
const Keylookup_key (const Key &key) const
 
template<typename ForwardKey >
const Keylookup_key_as (const ForwardKey &key) const
 
const Keylookup_key_ptr (const Key &key) const
 
template<typename ForwardKey >
const Keylookup_key_ptr_as (const ForwardKey &key) const
 
template<typename FuncT >
void foreach_item (const FuncT &func) const
 
KeyIterator keys () const
 
ValueIterator values () const
 
MutableValueIterator values ()
 
ItemIterator items () const
 
MutableItemIterator items ()
 
void remove (const BaseIterator &iterator)
 
template<typename Predicate >
int64_t remove_if (Predicate &&predicate)
 
void print_stats (const char *name) const
 
int64_t size () const
 
bool is_empty () const
 
int64_t capacity () const
 
int64_t removed_amount () const
 
int64_t size_per_element () const
 
int64_t size_in_bytes () const
 
void reserve (int64_t n)
 
void clear ()
 
void clear_and_shrink ()
 
int64_t count_collisions (const Key &key) const
 

Friends

bool operator== (const Map &a, const Map &b)
 
bool operator!= (const Map &a, const Map &b)
 

Detailed Description

template<typename Key, typename Value, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
class blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >

Definition at line 129 of file BLI_map.hh.

Member Typedef Documentation

◆ Item

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
using blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::Item = MapItem<Key, Value>

Definition at line 132 of file BLI_map.hh.

◆ MutableItem

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
using blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::MutableItem = MutableMapItem<Key, Value>

Definition at line 133 of file BLI_map.hh.

◆ size_type

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
using blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size_type = int64_t

Definition at line 131 of file BLI_map.hh.

Constructor & Destructor Documentation

◆ Map() [1/4]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::Map ( Allocator allocator = {})
inlinenoexcept

Initialize an empty map. This is a cheap operation no matter how large the inline buffer is. This is necessary to avoid a high cost when no elements are added at all. An optimized grow operation is performed on the first insertion.

Definition at line 186 of file BLI_map.hh.

◆ Map() [2/4]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::Map ( NoExceptConstructor ,
Allocator allocator = {} )
inlinenoexcept

Definition at line 197 of file BLI_map.hh.

◆ ~Map()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::~Map ( )
default

◆ Map() [3/4]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::Map ( const Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > & other)
default

◆ Map() [4/4]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::Map ( Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > && other)
inlinenoexcept

Definition at line 203 of file BLI_map.hh.

Member Function Documentation

◆ add() [1/4]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
bool blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add ( const Key & key,
const Value & value )
inline

Add a key-value-pair to the map. If the map contains the key already, nothing is changed. If you want to replace the currently stored value, use add_overwrite. Returns true when the key has been newly added.

This is similar to std::unordered_map::insert.

Definition at line 271 of file BLI_map.hh.

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

Referenced by add(), blender::bke::id::IDRemapper::add(), blender::compositor::MetaData::add(), blender::ed::spreadsheet::ExtraColumns::add(), blender::add_data_block_items_writeback(), blender::realtime_compositor::FileOutput::add_meta_data(), blender::ed::object::apply_eval_grease_pencil_data(), blender::nodes::inverse_eval::backpropagate_socket_values(), blender::nodes::inverse_eval::backpropagate_socket_values_through_node(), blender::deg::ObjectRuntimeBackup::backup_pose_channel_runtime_data(), BKE_blendfile_link_append_context_item_newid_set(), BKE_blendfile_override(), BKE_main_merge(), blf_glyph_cache_add_blank(), blf_glyph_cache_add_glyph(), blf_glyph_cache_add_svg(), BLO_memfile_merge(), blo_read_shared_impl(), BLO_write_shared(), blender::ed::greasepencil::clipboard_materials_remap(), blender::io::usd::USDStageReader::collect_readers(), blender::realtime_compositor::compute_number_of_needed_buffers(), blender::nodes::node_geo_interpolate_curves_cc::compute_points_per_curve_by_group(), convert_mfaces_to_mpolys(), blender::animrig::convert_to_layered_action(), blender::ed::space_node::NodeClipboard::copy_add_node(), blender::bke::bake::copy_bake_item_to_socket_value(), count_fcurves_hidden_by_filter(), blender::io::usd::USDStageReader::create_proto_collections(), ED_armature_join_objects_exec(), blender::deg::light_linking::internal::LinkingData::end_build(), blender::ed::asset::list::ensure_list_storage(), blender::nodes::inverse_eval::evaluate_node_elem_downstream_filtered(), blender::nodes::inverse_eval::evaluate_node_elem_upstream(), blender::nodes::inverse_eval::find_local_inverse_eval_targets(), blender::bke::find_zone_nodes(), blender::nodes::inverse_eval::foreach_element_on_inverse_eval_path(), blender::ed::geometry::gather_input_ids(), blender::nodes::geo_eval_log::GeoModifierLog::get_tree_log_by_zone_for_node_editor(), grease_pencil_layer_initialize_trans_data(), blender::bke::blendfile::PartialWriteContext::id_add(), blender::io::usd::import_skeleton(), blender::io::usd::init_deform_bones_map(), join_armature_remap_collection(), knife_find_line_hits(), knife_make_cuts(), blender::bke::greasepencil::convert::legacy_gpencil_object(), blender::bke::greasepencil::convert::legacy_main(), menu_items_from_ui_create(), menu_types_add_from_keymap_items(), blender::ed::greasepencil::merge_layers(), blender::ed::greasepencil::mirror_selected_frames(), blender::fn::multi_function::procedure_optimization::move_destructs_up(), new_id_to_item_mapping_add(), blender::ed::space_node::node_duplicate_exec(), blender::ed::space_node::node_group_make_insert_selected(), blender::ed::space_node::node_group_separate_selected(), blender::ed::space_node::node_group_ungroup(), blender::ed::space_node::NodeClipboard::paste_validate_id_references(), blender::io::usd::USDStageReader::process_armature_modifiers(), propagate_reroute_type_from_start_socket(), blender::nodes::inverse_eval::propagate_value_elem_filtered(), blender::io::alembic::read_edge_creases(), blender::draw::Manager::register_layer_attributes(), remake_graph_transdata(), blender::ed::space_node::reroute_node_get_auto_label(), blender::nodes::inverse_eval::InverseEvalParams::set_input(), blender::ed::greasepencil::snap_selected_frames(), sph_springhash_build(), blender::ed::spreadsheet::spreadsheet_filter_rows(), blender::io::obj::OBJMesh::store_uv_coords_and_indices(), blender::bke::greasepencil::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::nodes::node_geo_bake_cc::DummyDataBlockMap::try_add(), blender::try_find_baked_data(), blender::update_bakes_from_node_group(), blender::update_panels_from_node_group(), blender::bke::update_zone_per_node(), version_legacy_actions_to_layered(), ViewLink::views_bounds_calc(), blender::ed::view3d::geometry_nodes_gizmos::WIDGETGROUP_geometry_nodes_refresh(), and wm_link_append_exec().

◆ add() [2/4]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
bool blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add ( const Key & key,
Value && value )
inline

◆ add() [3/4]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
bool blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add ( Key && key,
const Value & value )
inline

◆ add() [4/4]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
bool blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add ( Key && key,
Value && value )
inline

◆ add_as()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey , typename... ForwardValue>
bool blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_as ( ForwardKey && key,
ForwardValue &&... value )
inline

◆ add_new() [1/4]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
void blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new ( const Key & key,
const Value & value )
inline

Insert a new key-value-pair into the map. This invokes undefined behavior when the key is in the map already.

Definition at line 241 of file BLI_map.hh.

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

Referenced by blender::bke::DataTypeConversions::add(), blender::gpu::render_graph::VKResourceStateTracker::add_buffer(), blender::bke::greasepencil::Layer::add_frame(), blender::gpu::render_graph::VKResourceStateTracker::add_image(), blender::io::obj::MTLWriter::add_materials(), blender::ed::greasepencil::add_vertex_groups(), BKE_main_library_weak_reference_add_item(), blender::blend_write(), BLO_memfile_write_init(), blender::nodes::node_geo_interpolate_curves_cc::build_kdtrees_for_root_positions(), blender::fn::build_multi_function_procedure_for_fields(), blender::AtomicDisjointSet::calc_reduced_ids(), blender::bke::ComponentAttributeProviders::ComponentAttributeProviders(), blender::io::usd::convert_usd_interp_to_blender(), blender::io::usd::convert_usd_type_to_blender(), blender::io::usd::convert_usd_varying_to_blender(), blender::ed::space_node::NodeClipboard::copy_add_node(), blender::asset_system::copy_catalog_map_into_existing(), blender::ed::greasepencil::copy_layer_group_content(), blender::fn::multi_function::ProcedureDotExport::create_nodes(), blender::deg::RNANodeQueryIDData::ensure_constraint_to_pchan_map(), blender::nodes::geo_eval_log::find_tree_zone_hash_recursive(), blender::nodes::geo_eval_log::GeoModifierLog::get_context_hash_by_zone_for_node_editor(), blender::io::hydra::ObjectData::get_or_create_material(), blender::io::obj::get_or_create_material(), gpu_shader_create_info_init(), blender::nodes::initialize_zone_wrapper(), blender::seq::media_presence_is_missing(), blender::ed::space_node::node_clipboard_paste_exec(), blender::bke::node_copy_with_mapping(), blender::ed::space_node::node_duplicate_exec(), blender::ed::space_node::node_group_separate_selected(), blender::bke::node_tree_to_dot(), blender::io::obj::OBJParser::parse(), blender::io::usd::preview_surface_input_map(), blender::ed::space_node::remap_node_pairing(), blender::io::usd::shape_key_export_chaser(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::fn::lazy_function::Graph::to_dot(), blender::nodes::DerivedNodeTree::to_dot(), blender::CPPType::to_static_type(), blender::ed::space_node::update_nested_node_refs_after_moving_nodes_into_group(), blender::bke::NodeTreeMainUpdater::update_rooted(), version_bonegroups_to_bonecollections(), wm_operatortype_append__end(), WM_operatortype_append_macro(), and WM_operatortype_append_macro_ptr().

◆ add_new() [2/4]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
void blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new ( const Key & key,
Value && value )
inline

◆ add_new() [3/4]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
void blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new ( Key && key,
const Value & value )
inline

◆ add_new() [4/4]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
void blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new ( Key && key,
Value && value )
inline

◆ add_new_as()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey , typename... ForwardValue>
void blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new_as ( ForwardKey && key,
ForwardValue &&... value )
inline

◆ add_or_modify() [1/2]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
template<typename CreateValueF , typename ModifyValueF >
auto blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_or_modify ( const Key & key,
const CreateValueF & create_value,
const ModifyValueF & modify_value ) -> decltype(create_value(nullptr))
inline

This method can be used to implement more complex custom behavior without having to do multiple lookups

When the key did not yet exist in the map, the create_value function is called. Otherwise the modify_value function is called.

Both functions are expected to take a single parameter of type Value *. In create_value, this pointer will point to uninitialized memory that has to be initialized by the function. In modify_value, it will point to an already initialized value.

The function returns whatever is returned from the create_value or modify_value callback. Therefore, both callbacks have to have the same return type.

In this example an integer is stored for every key. The initial value is five and we want to increase it every time the same key is used. map.add_or_modify(key, [](int *value) { *value = 5; }, [](int *value) { (*value)++; });

Definition at line 457 of file BLI_map.hh.

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

Referenced by blender::ed::object::apply_eval_grease_pencil_data(), blender::ed::object::bake_simulation::bake_simulation_get_path_users(), BM_mesh_validate(), blender::draw::DRW_mesh_batch_cache_create_requested(), ED_image_paint_tile_push(), blender::bke::GeometrySet::gather_attributes_for_propagation(), blender::geometry::gather_attributes_to_propagate(), blender::geometry::get_final_attribute_info(), blender::nodes::node_geo_index_of_nearest_cc::HasNeighborFieldInput::get_varray_for_context(), laplacian_increase_edge_count(), blender::draw::lines_adjacency_triangle(), blender::ed::greasepencil::merge_layers(), blender::bke::pbvh::uv_islands::mesh_data_init_edges(), blender::draw::statvis_calc_sharp(), and test_polyfill_topology().

◆ add_or_modify() [2/2]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
template<typename CreateValueF , typename ModifyValueF >
auto blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_or_modify ( Key && key,
const CreateValueF & create_value,
const ModifyValueF & modify_value ) -> decltype(create_value(nullptr))
inline

◆ add_or_modify_as()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey , typename CreateValueF , typename ModifyValueF >
auto blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_or_modify_as ( ForwardKey && key,
const CreateValueF & create_value,
const ModifyValueF & modify_value ) -> decltype(create_value(nullptr))
inline

◆ add_overwrite() [1/4]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
bool blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_overwrite ( const Key & key,
const Value & value )
inline

◆ add_overwrite() [2/4]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
bool blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_overwrite ( const Key & key,
Value && value )
inline

◆ add_overwrite() [3/4]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
bool blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_overwrite ( Key && key,
const Value & value )
inline

◆ add_overwrite() [4/4]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
bool blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_overwrite ( Key && key,
Value && value )
inline

◆ add_overwrite_as()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey , typename... ForwardValue>
bool blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_overwrite_as ( ForwardKey && key,
ForwardValue &&... value )
inline

◆ capacity()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
int64_t blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::capacity ( ) const
inline

Returns the number of available slots. This is mostly for debugging purposes.

Definition at line 945 of file BLI_map.hh.

References blender::Array< T, InlineBufferCapacity, Allocator >::size().

◆ clear()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
void blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::clear ( )
inline

◆ clear_and_shrink()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
void blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::clear_and_shrink ( )
inline

◆ contains()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
bool blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains ( const Key & key) const
inline

Returns true if there is a key in the map that compares equal to the given key.

This is similar to std::unordered_map::contains.

Definition at line 329 of file BLI_map.hh.

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

Referenced by add_anim_sample(), blender::gpu::render_graph::VKResourceStateTracker::add_buffer(), blender::gpu::render_graph::VKResourceStateTracker::add_image(), blender::nodes::inverse_eval::backpropagate_socket_values(), blender::gpu::VKShaderCompiler::batch_finalize(), blender::gpu::VKShaderCompiler::batch_is_ready(), BKE_blendfile_link_append_context_item_newid_set(), BKE_main_merge(), blender::fn::build_multi_function_procedure_for_fields(), blender::deg::light_linking::internal::EmitterDataMap::can_skip_emitter(), blender::realtime_compositor::compute_number_of_needed_buffers(), blender::ed::space_node::NodeClipboard::copy_add_node(), blender::asset_system::copy_catalog_map_into_existing(), count_fcurves_hidden_by_filter(), blender::io::usd::create_pose_joints(), blender::ed::sculpt_paint::ensure_editable_drawings(), blender::io::usd::get_armature_bone_names(), blender::nodes::inverse_eval::get_input_elems_to_propagate(), blender::bke::id::IDRemapper::get_mapping_result(), gpu_shader_create_info_get(), gpu_shader_create_info_get_unfinalized_copy(), grease_pencil_layer_apply_trans_data(), grease_pencil_layer_initialize_trans_data(), grease_pencil_layer_update_trans_data(), initialize(), blender::bke::DataTypeConversions::is_convertible(), blender::compositor::MetaData::is_cryptomatte_layer(), blender::NodesModifierBakeDataBlockMap::lookup_or_remember_missing(), blender::ed::space_node::node_clipboard_copy_exec(), blender::ed::space_node::node_clipboard_paste_exec(), blender::ed::space_node::NodeClipboard::paste_update_node_id_references(), blender::ed::space_node::NodeClipboard::paste_validate_id_references(), retime_key_draw(), sequencer_retiming_draw_continuity(), blender::ed::spreadsheet::spreadsheet_filter_rows(), blender::asset_system::tests::TEST_F(), test_polyfill_topology(), blender::NodesModifierBakeDataBlockMap::try_add(), blender::update_bakes_from_node_group(), blender::bke::NodeTreeMainUpdater::update_rooted(), blender::bke::update_zone_per_node(), and blender::ed::view3d::geometry_nodes_gizmos::WIDGETGROUP_geometry_nodes_refresh().

◆ contains_as()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey >
bool blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains_as ( const ForwardKey & key) const
inline

◆ count_collisions()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
int64_t blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::count_collisions ( const Key & key) const
inline

Get the number of collisions that the probing strategy has to go through to find the key or determine that it is not in the map.

Definition at line 1013 of file BLI_map.hh.

◆ foreach_item()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
template<typename FuncT >
void blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::foreach_item ( const FuncT & func) const
inline

Calls the provided callback for every key-value-pair in the map. The callback is expected to take a const Key & as first and a const Value & as second parameter.

Definition at line 649 of file BLI_map.hh.

References blender::Array< T, InlineBufferCapacity, Allocator >::size(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size().

Referenced by blender::ed::object::apply_objects_internal(), blender::dot::Attributes::export__as_bracket_list(), and blender::ed::object::object_origin_set_exec().

◆ is_empty()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
bool blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::is_empty ( ) const
inline

◆ items() [1/2]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
MutableItemIterator blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items ( )
inline

Returns an iterator over all key-value-pairs in the map. The key-value-pairs are stored in a #MutableMapItem. The iterator is invalidated, when the map is changed.

This iterator also allows you to modify the value (but not the key).

Definition at line 875 of file BLI_map.hh.

References blender::Array< T, InlineBufferCapacity, Allocator >::data(), and blender::Array< T, InlineBufferCapacity, Allocator >::size().

◆ items() [2/2]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
ItemIterator blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items ( ) const
inline

Returns an iterator over all key-value-pairs in the map. The key-value-pairs are stored in a #MapItem. The iterator is invalidated, when the map is changed.

Definition at line 864 of file BLI_map.hh.

References blender::Array< T, InlineBufferCapacity, Allocator >::data(), and blender::Array< T, InlineBufferCapacity, Allocator >::size().

Referenced by blender::nodes::node_geo_instance_on_points_cc::add_instances_from_component(), blender::ed::space_node::add_reroute_exec(), blender::compositor::MetaData::add_to_render_result(), utils::assign_materials(), blender::nodes::inverse_eval::backpropagate_socket_values_through_node(), blender::ed::object::bake_simulation::bake_geometry_nodes_startjob(), blender::ed::object::bake_simulation::bake_simulation_invoke(), BKE_cryptomatte_store_metadata(), blender::nodes::LazyFunctionForForeachGeometryElementZone::build_graph_contents(), blender::gpu::MTLContextTextureUtils::cleanup(), blender::io::usd::USDStageReader::clear_readers(), blender::realtime_compositor::PixelOperation::compute_results_reference_counts(), blender::nodes::node_geo_instances_to_points_cc::convert_instances_to_points(), blender::fn::multi_function::ProcedureDotExport::create_edges(), blender::draw::create_lines_for_remaining_edges(), blender::io::usd::USDStageReader::create_proto_collections(), cutEdges(), blender::draw_named_attributes_panel(), blender::ed::greasepencil::duplicate_layer_and_frames(), explodeMesh(), blender::io::usd::USDStageReader::fake_users_for_unused_materials(), blender::compositor::MetaData::for_each_entry(), blender::nodes::inverse_eval::foreach_element_on_inverse_eval_path(), blender::geometry::gather_generic_curve_attributes_to_propagate(), blender::geometry::gather_generic_grease_pencil_attributes_to_propagate(), blender::geometry::gather_generic_instance_attributes_to_propagate(), blender::geometry::gather_generic_mesh_attributes_to_propagate(), blender::geometry::gather_generic_pointcloud_attributes_to_propagate(), generate(), blender::nodes::geo_eval_log::GeoModifierLog::get_tree_log_by_zone_for_node_editor(), gpu_shader_create_info_init(), grease_pencil_layer_apply_trans_data(), blender::ed::greasepencil::grease_pencil_layer_duplicate_exec(), GreasePencilLayerToTransData(), blender::io::usd::init_deform_bones_map(), blender::nodes::initialize_zone_wrapper(), blender::animrig::EvaluationResult::items(), blender::MultiValueMap< Key, Value >::items(), blender::bke::id::IDRemapper::iter(), blender::geometry::join_attributes(), knife_make_cuts(), blender::ed::greasepencil::merge_layers(), blender::ed::space_node::node_duplicate_exec(), blender::nodes::node_geo_split_to_instances_cc::node_geo_exec(), blender::ed::space_node::node_group_make_insert_selected(), ntree_update_reroute_nodes(), blender::bke::cryptomatte::CryptomatteLayer::operator[](), blender::ed::space_node::remap_node_pairing(), blender::bke::bake::rename_attributes(), blender::realtime_compositor::FileOutput::save(), blender::io::usd::shape_key_export_chaser(), blender::io::usd::skinned_mesh_export_chaser(), blender::draw::pbvh::DrawCacheImpl::tag_attribute_changed(), blender::tests::TEST(), blender::bke::cryptomatte::manifest::to_manifest(), blender::gpu::MTLBufferPool::update_memory_pools(), blender::bke::NodeTreeMainUpdater::update_rooted(), blender::bke::update_zone_per_node(), version_legacy_actions_to_layered(), ViewLink::views_bounds_calc(), and blender::ui::string_search::write_recent_searches_file().

◆ keys()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
KeyIterator blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::keys ( ) const
inline

◆ lookup() [1/2]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
Value & blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup ( const Key & key)
inline

◆ lookup() [2/2]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
const Value & blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup ( const Key & key) const
inline

Returns a reference to the value that corresponds to the given key. This invokes undefined behavior when the key is not in the map.

Definition at line 506 of file BLI_map.hh.

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

Referenced by blender::gpu::render_graph::VKResourceStateTracker::add_buffer(), blender::gpu::render_graph::VKResourceStateTracker::add_image(), blender::ed::object::apply_grease_pencil_for_modifier_all_keyframes(), blender::ed::spreadsheet::apply_row_filter(), blender::gpu::MTLParallelShaderCompiler::batch_is_ready(), blender::gpu::VKShaderCompiler::batch_is_ready(), BKE_main_library_weak_reference_remove_item(), BKE_main_library_weak_reference_update_item(), blender::nodes::LazyFunctionForForeachGeometryElementZone::build_graph_contents(), blender::fn::build_multi_function_procedure_for_fields(), blender::AtomicDisjointSet::calc_reduced_ids(), blender::realtime_compositor::compute_number_of_needed_buffers(), blender::realtime_compositor::compute_schedule(), blender::animrig::convert_to_layered_action(), blender::asset_system::copy_catalog_map_into_existing(), blender::fn::multi_function::ProcedureDotExport::create_edges(), blender::gpu::render_graph::VKRenderGraphLink::debug_print(), blender::draw::DRW_mesh_batch_cache_create_requested(), ED_armature_join_objects_exec(), edgecut_get(), blender::ed::asset::list::ensure_list_storage(), blender::draw::pbvh::DrawCacheImpl::ensure_tris_batches(), blender::nodes::inverse_eval::foreach_element_on_inverse_eval_path(), foreach_libblock_append_ensure_reusable_local_id_callback(), foreach_libblock_append_finalize_action_callback(), blender::gpu::render_graph::VKResourceStateTracker::get_buffer(), blender::gpu::render_graph::VKResourceStateTracker::get_buffer_and_increase_stamp(), blender::gpu::render_graph::VKResourceStateTracker::get_image(), blender::gpu::render_graph::VKResourceStateTracker::get_image_and_increase_stamp(), blender::bke::id::IDRemapper::get_mapping_result(), blender::realtime_compositor::PixelOperation::get_output_identifier_from_output_socket(), blender::nodes::node_geo_index_of_nearest_cc::HasNeighborFieldInput::get_varray_for_context(), gpu_shader_create_info_get(), gpu_shader_create_info_get_unfinalized_copy(), grease_pencil_layer_initialize_trans_data(), grease_pencil_layer_update_trans_data(), blender::bke::blendfile::PartialWriteContext::id_add(), knife_find_line_hits(), laplacian_edge_count(), blender::ed::greasepencil::merge_layers(), blender::ed::space_node::node_clipboard_copy_exec(), blender::ed::space_node::node_clipboard_paste_exec(), blender::bke::node_copy_with_mapping(), blender::ed::space_node::node_duplicate_exec(), blender::ed::space_node::node_duplicate_reparent_recursive(), blender::ed::space_node::node_group_separate_selected(), blender::bke::node_tree_to_dot(), blender::bke::ntree_copy_data(), blender::ed::space_node::NodeClipboard::paste_update_node_id_references(), blender::ed::space_node::NodeClipboard::paste_validate_id_references(), blender::bke::greasepencil::Layer::prepare_for_dna_write(), remap_ebone_bone_collection_references(), blender::ed::greasepencil::remap_vertex_groups(), blender::bke::greasepencil::Layer::remove_frame(), blender::gpu::render_graph::VKResourceStateTracker::reset_image_layouts(), blender::gpu::MTLParallelShaderCompiler::specialization_batch_is_ready(), blender::bke::greasepencil::tests::TEST(), blender::bke::greasepencil::tests::TEST(), blender::bke::greasepencil::tests::TEST(), blender::bke::greasepencil::tests::TEST(), blender::bke::greasepencil::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), test_polyfill_topology(), blender::fn::lazy_function::Graph::to_dot(), blender::try_find_baked_data(), blender::deg::unregister_graph(), blender::bke::NodeTreeMainUpdater::update_rooted(), blender::animrig::EvaluationResult::value(), version_bonegroups_to_bonecollections(), ViewLink::views_bounds_calc(), and wm_link_append_exec().

◆ lookup_as() [1/2]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey >
Value & blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_as ( const ForwardKey & key)
inline

◆ lookup_as() [2/2]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey >
const Value & blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_as ( const ForwardKey & key) const
inline

◆ lookup_default()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
Value blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_default ( const Key & key,
const Value & default_value ) const
inline

Returns a copy of the value that corresponds to the given key. If the key is not in the map, the provided default_value is returned.

Definition at line 531 of file BLI_map.hh.

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

Referenced by blender::string_search::StringSearchBase::add_impl(), blender::io::obj::MTLWriter::add_materials(), blender::ed::object::bake_simulation::bake_geometry_nodes_startjob(), BKE_blendfile_override(), BKE_main_library_weak_reference_search_item(), BKE_main_merge(), BLO_memfile_merge(), blo_read_shared_impl(), blender::ed::greasepencil::clipboard_materials_remap(), blender::bke::bNodeTreeZone::contains_node_recursively(), blender::io::usd::USDStageReader::create_proto_collections(), blender::bke::discover_tree_zones(), blender::io::usd::USDStageReader::fake_users_for_unused_materials(), blender::io::usd::find_existing_material(), blender::bke::find_zone_nodes(), foreach_libblock_append_add_dependencies_callback(), foreach_libblock_link_finalize_cb(), blender::ed::space_node::get_attribute_info_from_context(), blender::deg::light_linking::internal::LinkingData::get_light_set_for(), blender::deg::RNANodeQueryIDData::get_pchan_for_constraint(), blender::bke::bNodeTreeZones::get_zone_by_node(), blender::deg::BuilderMap::getIDTag(), grease_pencil_layer_update_trans_data(), join_armature_remap_collection(), knife_make_cuts(), blender::bke::greasepencil::convert::legacy_gpencil_object(), blender::bke::greasepencil::convert::legacy_main(), blender::nodes::node_geo_bake_cc::DummyDataBlockMap::lookup_or_remember_missing(), blender::NodesModifierBakeDataBlockMap::lookup_or_remember_missing(), menu_items_from_ui_create(), mywrite_id_begin(), blender::ed::space_node::node_clipboard_paste_exec(), blender::ed::space_node::NodeClipboard::paste_validate_id_references(), blender::io::usd::USDStageReader::process_armature_modifiers(), read_library_linked_ids(), blender::ed::space_node::remap_node_pairing(), blender::ed::space_node::remap_pairing(), blender::ed::geometry::replace_strings_with_id_pointers(), blender::io::usd::set_instance_collection(), blender::io::obj::OBJMesh::store_uv_coords_and_indices(), blender::CPPType::to_static_type(), blender::update_bakes_from_node_group(), blender::ed::space_node::update_nested_node_refs_after_moving_nodes_into_group(), blender::ed::space_node::update_nested_node_refs_after_ungroup(), and blender::update_panels_from_node_group().

◆ lookup_default_as()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey , typename... ForwardValue>
Value blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_default_as ( const ForwardKey & key,
ForwardValue &&... default_value ) const
inline

◆ lookup_key()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
const Key & blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_key ( const Key & key) const
inline

Returns the key that is stored in the set that compares equal to the given key. This invokes undefined behavior when the key is not in the map.

Definition at line 618 of file BLI_map.hh.

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

◆ lookup_key_as()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey >
const Key & blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_key_as ( const ForwardKey & key) const
inline

◆ lookup_key_ptr()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
const Key * blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_key_ptr ( const Key & key) const
inline

Returns a pointer to the key that is stored in the map that compares equal to the given key. If the key is not in the map, null is returned.

Definition at line 632 of file BLI_map.hh.

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

◆ lookup_key_ptr_as()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey >
const Key * blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_key_ptr_as ( const ForwardKey & key) const
inline

◆ lookup_or_add() [1/4]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
Value & blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add ( const Key & key,
const Value & value )
inline

◆ lookup_or_add() [2/4]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
Value & blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add ( const Key & key,
Value && value )
inline

◆ lookup_or_add() [3/4]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
Value & blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add ( Key && key,
const Value & value )
inline

◆ lookup_or_add() [4/4]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
Value & blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add ( Key && key,
Value && value )
inline

◆ lookup_or_add_as()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey , typename... ForwardValue>
Value & blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_as ( ForwardKey && key,
ForwardValue &&... value )
inline

◆ lookup_or_add_cb() [1/2]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
template<typename CreateValueF >
Value & blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_cb ( const Key & key,
const CreateValueF & create_value )
inline

◆ lookup_or_add_cb() [2/2]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
template<typename CreateValueF >
Value & blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_cb ( Key && key,
const CreateValueF & create_value )
inline

◆ lookup_or_add_cb_as()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey , typename CreateValueF >
Value & blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_cb_as ( ForwardKey && key,
const CreateValueF & create_value )
inline

◆ lookup_or_add_default() [1/2]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
Value & blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_default ( const Key & key)
inline

◆ lookup_or_add_default() [2/2]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
Value & blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_default ( Key && key)
inline

◆ lookup_or_add_default_as()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey >
Value & blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_default_as ( ForwardKey && key)
inline

◆ lookup_ptr() [1/2]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
Value * blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr ( const Key & key)
inline

◆ lookup_ptr() [2/2]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
const Value * blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr ( const Key & key) const
inline

Returns a pointer to the value that corresponds to the given key. If the key is not in the map, nullptr is returned.

This is similar to std::unordered_map::find.

Definition at line 484 of file BLI_map.hh.

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

Referenced by blender::gpu::MTLBufferPool::allocate_aligned(), blender::bke::id::IDRemapper::apply(), blender::nodes::inverse_eval::backpropagate_socket_values(), blender::nodes::inverse_eval::backpropagate_socket_values_through_node(), blender::ed::object::bake_simulation::bake_geometry_nodes_startjob(), blender::bke::cryptomatte::BKE_cryptomatte_layer_get(), BKE_cryptomatte_material_hash(), BKE_cryptomatte_object_hash(), blender::blend_write(), blo_read_shared_impl(), blender::ed::space_node::compositor_accumulate_frame_node_execution_time(), blender::ed::space_node::compositor_node_get_execution_time(), blender::io::usd::convert_usd_interp_to_blender(), blender::io::usd::convert_usd_type_to_blender(), blender::io::usd::convert_usd_varying_to_blender(), blender::asset_system::AssetCatalogDefinitionFile::copy_and_remap(), blender::io::usd::create_usd_preview_surface_material(), ED_image_paint_tile_find(), blender::ed::asset::list::ensure_list_storage(), blender::nodes::inverse_eval::evaluate_node_elem_downstream_filtered(), blender::nodes::inverse_eval::evaluate_node_elem_upstream(), blender::io::usd::find_existing_material(), blender::nodes::inverse_eval::find_local_inverse_eval_targets(), blender::bke::greasepencil::Layer::frame_at(), blender::bke::greasepencil::Layer::frame_at(), blender::deg::get_all_registered_graphs(), blender::bke::DataTypeConversions::get_conversion_functions(), blender::deg::light_linking::internal::EmitterDataMap::get_data(), blender::bke::greasepencil::Layer::get_frame_duration_at(), blender::nodes::inverse_eval::InverseEvalParams::get_input(), blender::nodes::value_elem::ElemEvalParams::get_input_elem(), blender::io::obj::get_or_create_material(), blender::nodes::inverse_eval::InverseEvalParams::get_output(), blender::nodes::value_elem::InverseElemEvalParams::get_output_elem(), blender::ed::greasepencil::join_object_with_active(), blender::bke::greasepencil::convert::legacy_main(), blender::ed::asset::list::lookup_list(), blender::animrig::EvaluationResult::lookup_ptr(), blender::animrig::EvaluationResult::lookup_ptr(), blender::seq::media_presence_is_missing(), namemap_remove_name(), blender::fn::multi_function::ValueAllocator::obtain_Span(), oldnewmap_lookup_and_inc(), blender::nodes::inverse_eval::propagate_socket_elem(), blender::nodes::inverse_eval::propagate_value_elem_filtered(), blender::io::alembic::read_edge_creases(), blender::render::hydra::FinalEngine::render(), blender::ed::space_node::reroute_node_get_auto_label(), blender::ed::space_node::shader_preview_startjob(), blender::io::usd::shape_key_export_chaser(), blender::io::usd::skinned_mesh_export_chaser(), blender::draw::pbvh::DrawCacheImpl::tag_face_sets_changed(), blender::draw::pbvh::DrawCacheImpl::tag_masks_changed(), blender::draw::pbvh::DrawCacheImpl::tag_positions_changed(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::io::usd::token_for_input(), update_transdata_bezt_pointers(), and version_legacy_actions_to_layered().

◆ lookup_ptr_as() [1/2]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey >
Value * blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr_as ( const ForwardKey & key)
inline

◆ lookup_ptr_as() [2/2]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey >
const Value * blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr_as ( const ForwardKey & key) const
inline

◆ operator=() [1/2]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
Map & blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::operator= ( const Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > & other)
inline

Definition at line 227 of file BLI_map.hh.

References blender::copy_assign_container().

◆ operator=() [2/2]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
Map & blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::operator= ( Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > && other)
inline

Definition at line 232 of file BLI_map.hh.

References blender::move_assign_container().

◆ pop()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
Value blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::pop ( const Key & key)
inline

◆ pop_as()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey >
Value blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::pop_as ( const ForwardKey & key)
inline

◆ pop_default() [1/2]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
Value blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::pop_default ( const Key & key,
const Value & default_value )
inline

Get the value that corresponds to the given key and remove it from the map. If the key is not in the map, return the given default value instead.

Definition at line 415 of file BLI_map.hh.

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

Referenced by blender::fn::multi_function::procedure_optimization::move_destructs_up(), and blender::compositor::MetaData::replace_hash_neutral_cryptomatte_keys().

◆ pop_default() [2/2]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
Value blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::pop_default ( const Key & key,
Value && default_value )
inline

◆ pop_default_as()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey , typename... ForwardValue>
Value blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::pop_default_as ( const ForwardKey & key,
ForwardValue &&... default_value )
inline

◆ pop_try()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
std::optional< Value > blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::pop_try ( const Key & key)
inline

◆ pop_try_as()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey >
std::optional< Value > blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::pop_try_as ( const ForwardKey & key)
inline

◆ print_stats()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
void blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::print_stats ( const char * name) const
inline

Print common statistics like size and collision count. This is useful for debugging purposes.

Definition at line 918 of file BLI_map.hh.

References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::keys(), and blender::HashTableStats::print().

◆ remove() [1/2]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
void blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove ( const BaseIterator & iterator)
inline

Remove the key-value-pair that the iterator is currently pointing at. It is valid to call this method while iterating over the map. However, after this method has been called, the removed element must not be accessed anymore.

Definition at line 885 of file BLI_map.hh.

References BLI_assert, and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::BaseIterator::current_slot().

◆ remove() [2/2]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
bool blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove ( const Key & key)
inline

◆ remove_as()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey >
bool blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove_as ( const ForwardKey & key)
inline

◆ remove_contained()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
void blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove_contained ( const Key & key)
inline

Deletes the key-value-pair with the given key. This invokes undefined behavior when the key is not in the map.

Definition at line 363 of file BLI_map.hh.

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

Referenced by blender::bke::greasepencil::Layer::remove_frame().

◆ remove_contained_as()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey >
void blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove_contained_as ( const ForwardKey & key)
inline

◆ remove_if()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
template<typename Predicate >
int64_t blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove_if ( Predicate && predicate)
inline

Remove all key-value-pairs for that the given predicate is true and return the number of removed pairs.

This is similar to std::erase_if.

Definition at line 899 of file BLI_map.hh.

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

Referenced by blender::io::hydra::InstancerData::post_update().

◆ removed_amount()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
int64_t blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::removed_amount ( ) const
inline

Returns the amount of removed slots in the set. This is mostly for debugging purposes.

Definition at line 953 of file BLI_map.hh.

◆ reserve()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
void blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::reserve ( int64_t n)
inline

◆ size()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
int64_t blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size ( ) const
inline

◆ size_in_bytes()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
int64_t blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size_in_bytes ( ) const
inline

Returns the approximate memory requirements of the map in bytes. This becomes more exact the larger the map becomes.

Definition at line 970 of file BLI_map.hh.

References blender::Array< T, InlineBufferCapacity, Allocator >::size().

◆ size_per_element()

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
int64_t blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size_per_element ( ) const
inline

Returns the bytes required per element. This is mostly for debugging purposes.

Definition at line 961 of file BLI_map.hh.

◆ values() [1/2]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
MutableValueIterator blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::values ( )
inline

Returns an iterator over all values in the map and allows you to change the values. The iterator is invalidated, when the map is changed.

Definition at line 855 of file BLI_map.hh.

References blender::Array< T, InlineBufferCapacity, Allocator >::data(), and blender::Array< T, InlineBufferCapacity, Allocator >::size().

◆ values() [2/2]

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
ValueIterator blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::values ( ) const
inline

Returns an iterator over all values in the map. The iterator is invalidated, when the map is changed.

Definition at line 846 of file BLI_map.hh.

References blender::Array< T, InlineBufferCapacity, Allocator >::data(), and blender::Array< T, InlineBufferCapacity, Allocator >::size().

Referenced by blender::ed::space_node::add_reroute_exec(), blender::io::hydra::InstancerData::available_materials(), blender::deg::DepsgraphRelationBuilder::build_driver_relations(), blender::nodes::node_geo_interpolate_curves_cc::build_kdtrees_for_root_positions(), blender::fn::build_multi_function_procedure_for_fields(), change_link_placeholder_to_real_ID_pointer_fd(), blender::io::hydra::HydraSceneDelegate::clear(), blender::asset_system::copy_catalog_map_into_existing(), blender::asset_system::tests::TestableAssetCatalogService::count_catalogs_with_path(), DRW_view_data_reset(), blender::realtime_compositor::ShaderOperation::execute(), blender::find_socket_log_contexts(), blender::render::TexturePool::free_unused_and_reset(), blender::nodes::node_geo_interpolate_curves_cc::generate_interpolated_curves(), blender::ed::space_node::get_attribute_info_from_context(), gpu_shader_create_info_compile(), gpu_shader_create_info_exit(), gpu_shader_create_info_init(), grease_pencil_layer_apply_trans_data(), image_undosys_step_encode(), blender::io::usd::USDShapeReader::is_time_varying(), menu_items_from_all_operators(), blender::ed::space_node::node_clipboard_copy_exec(), blender::ed::space_node::node_clipboard_paste_exec(), blender::ed::space_node::node_duplicate_exec(), blender::ed::space_node::node_group_separate_selected(), oldnewmap_clear(), operator_search_update_fn(), blender::ed::space_node::NodeClipboard::paste_validate_id_references(), blender::io::hydra::InstancerData::post_update(), blender::io::hydra::InstancerData::pre_update(), blender::io::hydra::InstancerData::prototypes(), ptile_invalidate_map(), ptile_restore_runtime_map(), blender::ed::space_node::remap_node_pairing(), blender::io::hydra::InstancerData::remove(), blender::gpu::render_graph::VKResourceStateTracker::reset_image_layouts(), blender::deg::ObjectRuntimeBackup::restore_pose_channel_runtime_data(), blender::ed::geometry::run_node_group_exec(), blender::ed::asset::list::storage_id_remap(), blender::ed::asset::list::storage_tag_main_data_dirty(), test_polyfill_topology(), blender::io::hydra::MaterialData::update(), blender::io::hydra::InstancerData::update_double_sided(), blender::gpu::MTLBufferPool::update_memory_pools(), blender::deg::light_linking::internal::EmitterDataMap::values(), blender::MultiValueMap< Key, Value >::values(), version_bonegroup_migrate_color(), blender::ed::view3d::geometry_nodes_gizmos::WIDGETGROUP_geometry_nodes_refresh(), WM_operatortype_idname_visit_for_search(), WM_operatortype_last_properties_clear_all(), blender::draw::pbvh::DrawCacheImpl::~DrawCacheImpl(), blender::GValueMap< Key >::~GValueMap(), blender::ed::space_node::NestedTreePreviews::~NestedTreePreviews(), and blender::render::TexturePool::~TexturePool().

Friends And Related Symbol Documentation

◆ operator!=

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
bool operator!= ( const Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > & a,
const Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > & b )
friend

Definition at line 1040 of file BLI_map.hh.

◆ operator==

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultMapSlot<Key, Value>::type, typename Allocator = GuardedAllocator>
bool operator== ( const Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > & a,
const Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > & b )
friend

True if both maps have the same key-value-pairs.

Definition at line 1021 of file BLI_map.hh.


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