|
Blender V4.3
|
#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 >) | |
| Map & | operator= (const Map &other) |
| Map & | operator= (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 Key & | lookup_key (const Key &key) const |
| template<typename ForwardKey > | |
| const Key & | lookup_key_as (const ForwardKey &key) const |
| const Key * | lookup_key_ptr (const Key &key) const |
| template<typename ForwardKey > | |
| const Key * | lookup_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) |
Definition at line 129 of file BLI_map.hh.
| using blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::Item = MapItem<Key, Value> |
Definition at line 132 of file BLI_map.hh.
| using blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::MutableItem = MutableMapItem<Key, Value> |
Definition at line 133 of file BLI_map.hh.
| using blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size_type = int64_t |
Definition at line 131 of file BLI_map.hh.
|
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.
|
inlinenoexcept |
Definition at line 197 of file BLI_map.hh.
|
default |
|
default |
|
inlinenoexcept |
Definition at line 203 of file BLI_map.hh.
|
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().
|
inline |
Definition at line 275 of file BLI_map.hh.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_as().
|
inline |
Definition at line 279 of file BLI_map.hh.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_as().
|
inline |
Definition at line 283 of file BLI_map.hh.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_as().
|
inline |
Definition at line 288 of file BLI_map.hh.
Referenced by blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::io::serialize::DictionaryValue::create_lookup(), and blender::tests::TEST().
|
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.
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().
|
inline |
Definition at line 245 of file BLI_map.hh.
|
inline |
Definition at line 249 of file BLI_map.hh.
|
inline |
Definition at line 253 of file BLI_map.hh.
|
inline |
Definition at line 258 of file BLI_map.hh.
Referenced by blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), blender::GValueMap< Key >::add_new_by_copy(), blender::GValueMap< Key >::add_new_by_move(), and blender::GValueMap< Key >::add_new_direct().
|
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.
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().
|
inline |
Definition at line 464 of file BLI_map.hh.
|
inline |
|
inline |
Adds a key-value-pair to the map. If the map contained the key already, the corresponding value will be replaced. Returns true when the key has been newly added.
This is similar to std::unordered_map::insert_or_assign.
Definition at line 301 of file BLI_map.hh.
Referenced by blender::bke::id::IDRemapper::add_overwrite(), blender::ui::string_search::add_recent_search(), BKE_main_library_weak_reference_update_item(), grease_pencil_layer_apply_trans_data(), grease_pencil_layer_initialize_trans_data(), grease_pencil_layer_update_trans_data(), blender::insert_keys_forward(), blender::insert_keys_reverse(), blender::bke::greasepencil::convert::legacy_gpencil_sanitize_annotations(), blender::seq::media_presence_set_missing(), oldnewmap_insert(), read_library_linked_ids(), blender::ui::string_search::read_recent_searches_file(), blender::ed::space_node::reroute_node_get_auto_label(), blender::dot::Attributes::set(), blender::dot::Attributes::set(), blender::render::hydra::FinalEngine::set_render_setting(), blender::animrig::EvaluationResult::store(), blender::NodesModifierBakeDataBlockMap::try_add(), and blender::bke::update_zone_per_node().
|
inline |
Definition at line 305 of file BLI_map.hh.
|
inline |
Definition at line 309 of file BLI_map.hh.
|
inline |
Definition at line 313 of file BLI_map.hh.
|
inline |
Definition at line 318 of file BLI_map.hh.
Referenced by blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_overwrite(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_overwrite(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_overwrite(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_overwrite().
|
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().
|
inline |
Removes all key-value-pairs from the map.
Definition at line 989 of file BLI_map.hh.
Referenced by blender::draw::Manager::begin_sync(), blender::gpu::MTLContextTextureUtils::cleanup(), blender::bke::id::IDRemapper::clear(), blender::deg::light_linking::internal::EmitterDataMap::clear(), blender::deg::light_linking::internal::LinkingData::clear(), blender::draw::command::DrawMultiBuf::clear(), blender::io::hydra::HydraSceneDelegate::clear(), blender::MultiValueMap< Key, Value >::clear(), blender::io::usd::USDStageReader::clear_readers(), direct_link_id(), DRW_view_data_reset(), blender::ed::greasepencil::duplicate_layer_and_frames(), blender::render::TexturePool::free_unused_and_reset(), grease_pencil_layer_apply_trans_data(), blender::ed::greasepencil::grease_pencil_layer_duplicate_exec(), grease_pencil_layer_initialize_trans_data(), image_undosys_step_encode(), blender::io::usd::init_deform_bones_map(), read_library_linked_ids(), blender::ui::string_search::read_recent_searches_file(), and blender::io::hydra::InstancerData::remove().
|
inline |
Removes all key-value-pairs from the map and frees any allocated memory.
Definition at line 1003 of file BLI_map.hh.
References Map.
Referenced by BLO_memfile_write_finalize(), blender::bke::greasepencil::LayerRuntime::clear(), blender::ed::space_node::NodeClipboard::clear(), blender::MultiValueMap< Key, Value >::clear_and_shrink(), oldnewmap_clear(), blender::ed::asset::list::storage_exit(), and GlyphCacheBLF::~GlyphCacheBLF().
|
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.
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().
|
inline |
Definition at line 333 of file BLI_map.hh.
Referenced by blender::GValueMap< Key >::contains(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains().
|
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.
|
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().
|
inline |
Returns true if there are no elements in the map.
This is similar to std::unordered_map::empty.
Definition at line 937 of file BLI_map.hh.
Referenced by blender::add_data_block_items_writeback(), blender::nodes::inverse_eval::backpropagate_socket_values(), blender::io::usd::USDStageReader::create_proto_collections(), blender::draw_named_attributes_panel(), blender::io::usd::USDStageReader::import_all_materials(), blender::animrig::EvaluationResult::is_empty(), blender::bke::id::IDRemapper::is_empty(), blender::deg::light_linking::internal::EmitterDataMap::is_empty(), blender::ed::space_node::node_duplicate_exec(), blender::io::obj::OBJParser::parse(), blender::io::hydra::InstancerData::post_update(), blender::io::hydra::InstancerData::remove(), blender::io::usd::shape_key_export_chaser(), blender::tests::TEST(), blender::asset_system::tests::TEST_F(), blender::ui::string_search::write_recent_searches_file(), and blender::gpu::MTLParallelShaderCompiler::~MTLParallelShaderCompiler().
|
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().
|
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().
|
inline |
Allows writing a range-for loop that iterates over all keys. The iterator is invalidated, when the map is changed.
Definition at line 837 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::ed::object::apply_grease_pencil_for_modifier_all_keyframes(), blender::nodes::inverse_eval::backpropagate_socket_values(), blender::io::usd::USDStageReader::create_proto_collections(), blender::nodes::inverse_eval::foreach_element_on_inverse_eval_path(), blender::MultiValueMap< Key, Value >::keys(), blender::ed::space_node::node_duplicate_exec(), blender::nodes::node_geo_split_to_instances_cc::node_geo_exec(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::print_stats(), blender::bke::bake::rename_attributes(), blender::bke::greasepencil::Layer::sorted_keys(), blender::draw::statvis_calc_sharp(), blender::try_find_baked_data(), blender::gpu::MTLBufferPool::update_memory_pools(), and blender::gpu::MTLParallelShaderCompiler::~MTLParallelShaderCompiler().
|
inline |
Definition at line 510 of file BLI_map.hh.
|
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.
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().
|
inline |
Definition at line 520 of file BLI_map.hh.
References BLI_assert, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr_as(), and ptr.
|
inline |
Definition at line 514 of file BLI_map.hh.
References BLI_assert, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr_as(), and ptr.
Referenced by blender::GValueMap< Key >::lookup(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup().
|
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.
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().
|
inline |
Definition at line 536 of file BLI_map.hh.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr_as(), ptr, and Value.
Referenced by blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_default(), and WM_operatortype_find().
|
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.
|
inline |
Definition at line 622 of file BLI_map.hh.
Referenced by blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_key().
|
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.
|
inline |
Definition at line 636 of file BLI_map.hh.
Referenced by blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_key_ptr().
|
inline |
Returns a reference to the value corresponding to the given key. If the key is not in the map, a new key-value-pair is added and a reference to the value in the map is returned.
Definition at line 551 of file BLI_map.hh.
Referenced by blender::ed::space_node::all_nodes_preview_update(), blender::draw::command::DrawMultiBuf::append_draw(), blender::ed::object::apply_grease_pencil_for_modifier_all_keyframes(), blender::ed::object::bake_simulation::bake_geometry_nodes_startjob(), BKE_main_merge(), blender::deg::BuilderMap::checkIsBuiltAndTag(), blender::io::ply::generate_vertex_map(), blender::bke::greasepencil::convert::legacy_gpencil_sanitize_annotations(), blender::NodesModifierBakeDataBlockMap::lookup_or_remember_missing(), blender::ed::greasepencil::merge_layers(), namemap_add_name(), blender::ed::space_node::node_preview_acquire_ibuf(), blender::io::obj::OBJParser::parse(), blender::nodes::inverse_eval::propagate_socket_elem(), blender::nodes::inverse_eval::propagate_value_elem_filtered(), blender::realtime_compositor::Profiler::set_node_evaluation_time(), and blender::deg::BuilderMap::tagBuild().
|
inline |
Definition at line 555 of file BLI_map.hh.
|
inline |
Definition at line 559 of file BLI_map.hh.
|
inline |
Definition at line 563 of file BLI_map.hh.
|
inline |
Definition at line 568 of file BLI_map.hh.
Referenced by blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add().
|
inline |
Returns a reference to the value that corresponds to the given key. If the key is not yet in the map, it will be newly added.
The create_value callback is only called when the key did not exist yet. It is expected to take no parameters and return the value to be inserted.
Definition at line 582 of file BLI_map.hh.
Referenced by blender::bke::anonymous_attribute_inferencing::analyze_anonymous_attribute_usages(), blender::ed::object::apply_eval_grease_pencil_data(), BKE_main_namemap_get_name(), cutEdges(), DRW_view_data_pass_texture_get(), blender::deg::light_linking::internal::EmitterDataMap::ensure_data_if_possible(), explodeMesh(), blender::bke::generate_unique_instance_ids(), blender::NodesModifierBakeParams::get(), blender::NodesModifierSimulationParams::get(), blender::nodes::get_dot_cluster_for_context(), blender::nodes::node_geo_merge_layers_cc::get_layers_map_by_id(), blender::nodes::node_geo_merge_layers_cc::get_layers_map_by_name(), blender::nodes::LazyFunctionForReduceForeachGeometryElement::handle_generation_items_group(), blender::geometry::join_component_type(), blender::geometry::join_instances(), blender::ed::space_node::node_duplicate_exec(), and blender::deg::register_graph().
|
inline |
Definition at line 587 of file BLI_map.hh.
|
inline |
Definition at line 592 of file BLI_map.hh.
Referenced by blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_cb(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_cb(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_default_as().
|
inline |
Returns a reference to the value that corresponds to the given key. If the key is not yet in the map, it will be newly added. The newly added value will be default constructed.
Definition at line 601 of file BLI_map.hh.
Referenced by blender::ed::space_node::add_reroute_exec(), blender::render::TexturePool::allocate_texture(), utils::assign_materials(), blender::ed::object::bake_simulation::bake_geometry_nodes_startjob(), blender::gpu::VKShaderCompiler::batch_compile(), blender::io::usd::build_material_map(), blender::nodes::geo_eval_log::GeoModifierLog::get_local_tree_logger(), blender::io::usd::get_loops_polys(), blender::io::usd::USDStageReader::import_all_materials(), main_namemap_populate(), blender::ed::space_node::node_group_make_insert_selected(), blender::fn::multi_function::ValueAllocator::obtain_OneSingle(), blender::fn::multi_function::ValueAllocator::release_value(), blender::tests::TEST(), blender::io::hydra::InstancerData::update_instance(), and version_bonegroup_migrate_color().
|
inline |
Definition at line 605 of file BLI_map.hh.
|
inline |
Definition at line 609 of file BLI_map.hh.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_cb_as(), and Value.
Referenced by blender::MultiValueMap< Key, Value >::add_as(), blender::MultiValueMap< Key, Value >::add_multiple_as(), blender::MultiValueMap< Key, Value >::add_non_duplicates(), blender::deg::DepsgraphRelationBuilder::build_driver_relations(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_default(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_default().
|
inline |
Definition at line 488 of file BLI_map.hh.
|
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.
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().
|
inline |
Definition at line 497 of file BLI_map.hh.
|
inline |
Definition at line 492 of file BLI_map.hh.
Referenced by blf_glyph_cache_find_glyph(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_as(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_as(), blender::MultiValueMap< Key, Value >::lookup_as(), blender::MultiValueMap< Key, Value >::lookup_as(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_default_as(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr_as().
|
inline |
Definition at line 227 of file BLI_map.hh.
References blender::copy_assign_container().
|
inline |
Definition at line 232 of file BLI_map.hh.
References blender::move_assign_container().
|
inline |
Get the value that is stored for the given key and remove it from the map. This invokes undefined behavior when the key is not in the map.
Definition at line 378 of file BLI_map.hh.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::pop_as().
Referenced by blender::gpu::MTLParallelShaderCompiler::batch_finalize(), blender::gpu::VKShaderCompiler::batch_finalize(), blender::gpu::render_graph::VKResourceStateTracker::remove_buffer(), and blender::gpu::render_graph::VKResourceStateTracker::remove_image().
|
inline |
Definition at line 382 of file BLI_map.hh.
Referenced by blender::GValueMap< Key >::extract(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::pop().
|
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.
Referenced by blender::fn::multi_function::procedure_optimization::move_destructs_up(), and blender::compositor::MetaData::replace_hash_neutral_cryptomatte_keys().
|
inline |
Definition at line 419 of file BLI_map.hh.
|
inline |
Definition at line 424 of file BLI_map.hh.
References Value.
Referenced by blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::pop_default(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::pop_default().
|
inline |
Get the value that is stored for the given key and remove it from the map. If the key is not in the map, a value-less optional is returned.
Definition at line 395 of file BLI_map.hh.
Referenced by blender::geometry::gather_generic_curve_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(), and blender::deg::ObjectRuntimeBackup::restore_pose_channel_runtime_data().
|
inline |
Definition at line 399 of file BLI_map.hh.
Referenced by blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::pop_try().
|
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().
|
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().
|
inline |
Deletes the key-value-pair with the given key. Returns true when the key was contained and is now removed, otherwise false.
This is similar to std::unordered_map::erase.
Definition at line 344 of file BLI_map.hh.
Referenced by BKE_blendfile_link_append_context_item_newid_set(), BKE_main_library_weak_reference_remove_item(), blender::fn::build_multi_function_procedure_for_fields(), blender::nodes::node_geo_instances_to_points_cc::convert_instances_to_points(), blender::geometry::gather_generic_curve_attributes_to_propagate(), blender::geometry::gather_generic_mesh_attributes_to_propagate(), blender::geometry::gather_generic_pointcloud_attributes_to_propagate(), namemap_remove_name(), blender::nodes::node_geo_instance_on_points_cc::node_geo_exec(), blender::deg::unregister_graph(), and WM_operatortype_remove_ptr().
|
inline |
Definition at line 348 of file BLI_map.hh.
Referenced by grease_pencil_layer_initialize_trans_data(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove().
|
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.
Referenced by blender::bke::greasepencil::Layer::remove_frame().
|
inline |
Definition at line 367 of file BLI_map.hh.
Referenced by blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove_contained().
|
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().
|
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.
|
inline |
Potentially resize the map such that the specified number of elements can be added without another grow operation.
Definition at line 979 of file BLI_map.hh.
Referenced by BM_mesh_validate(), blender::AtomicDisjointSet::calc_reduced_ids(), convert_mfaces_to_mpolys(), blender::geometry::create_value_to_first_index_map(), blender::draw::extract_lines_adjacency(), blender::draw::extract_lines_adjacency_subdiv(), blender::io::ply::generate_vertex_map(), get_operators_map(), laplacian_system_construct_end(), mesh_calc_edges_mdata(), blender::bke::pbvh::uv_islands::mesh_data_init_edges(), blender::io::alembic::read_edge_creases(), sph_springhash_build(), blender::draw::statvis_calc_sharp(), blender::io::obj::OBJMesh::store_uv_coords_and_indices(), and blender::tests::TEST().
|
inline |
Return the number of key-value-pairs that are stored in the map.
Definition at line 927 of file BLI_map.hh.
Referenced by blender::ed::space_node::add_reroute_exec(), blender::ed::object::apply_grease_pencil_for_modifier_all_keyframes(), utils::assign_materials(), blender::AtomicDisjointSet::calc_reduced_ids(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::foreach_item(), generate(), blender::io::ply::generate_vertex_map(), blender::nodes::node_geo_split_to_instances_cc::node_geo_exec(), blender::io::obj::OBJParser::parse(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove_if(), blender::ed::space_node::row_from_used_named_attribute(), sequencer_retiming_mode_is_active(), blender::gpu::VKDescriptorSetLayouts::size(), blender::MultiValueMap< Key, Value >::size(), blender::io::obj::OBJMesh::store_uv_coords_and_indices(), 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::asset_system::tests::TEST_F(), test_polyfill_topology(), and blender::gpu::MTLBufferPool::update_memory_pools().
|
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().
|
inline |
Returns the bytes required per element. This is mostly for debugging purposes.
Definition at line 961 of file BLI_map.hh.
|
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().
|
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().
|
friend |
Definition at line 1040 of file BLI_map.hh.
|
friend |
True if both maps have the same key-value-pairs.
Definition at line 1021 of file BLI_map.hh.