|
Blender V5.0
|
#include <BLI_set.hh>
Classes | |
| class | Iterator |
Public Types | |
| using | value_type = Key |
| using | pointer = Key * |
| using | const_pointer = const Key * |
| using | reference = Key & |
| using | const_reference = const Key & |
| using | iterator = Iterator |
| using | size_type = int64_t |
Public Member Functions | |
| Set (Allocator allocator={}) noexcept | |
| Set (NoExceptConstructor, Allocator allocator={}) noexcept | |
| Set (Span< Key > values, Allocator allocator={}) | |
| Set (const std::initializer_list< Key > &values) | |
| ~Set ()=default | |
| Set (const Set &other)=default | |
| Set (Set &&other) noexcept(std::is_nothrow_move_constructible_v< SlotArray >) | |
| Set & | operator= (const Set &other) |
| Set & | operator= (Set &&other) |
| void | add_new (const Key &key) |
| void | add_new (Key &&key) |
| bool | add (const Key &key) |
| bool | add (Key &&key) |
| template<typename ForwardKey> | |
| bool | add_as (ForwardKey &&key) |
| bool | add_overwrite (const Key &key) |
| bool | add_overwrite (Key &&key) |
| template<typename ForwardKey> | |
| bool | add_overwrite_as (ForwardKey &&key) |
| void | add_multiple (Span< Key > keys) |
| void | add_multiple_new (Span< Key > keys) |
| bool | contains (const Key &key) const |
| template<typename ForwardKey> | |
| bool | contains_as (const ForwardKey &key) const |
| const Key & | lookup_key (const Key &key) const |
| template<typename ForwardKey> | |
| const Key & | lookup_key_as (const ForwardKey &key) const |
| const Key & | lookup_key_default (const Key &key, const Key &default_value) const |
| template<typename ForwardKey> | |
| const Key & | lookup_key_default_as (const ForwardKey &key, const Key &default_key) const |
| const Key * | lookup_key_ptr (const Key &key) const |
| template<typename ForwardKey> | |
| const Key * | lookup_key_ptr_as (const ForwardKey &key) const |
| const Key & | lookup_key_or_add (const Key &key) |
| const Key & | lookup_key_or_add (Key &&key) |
| template<typename ForwardKey> | |
| const Key & | lookup_key_or_add_as (ForwardKey &&key) |
| 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) |
| Iterator | begin () const |
| Iterator | end () const |
| void | remove (const Iterator &it) |
| template<typename Predicate> | |
| int64_t | remove_if (Predicate &&predicate) |
| void | print_stats (const char *name) const |
| int64_t | count_collisions (const Key &key) const |
| void | clear () |
| void | clear_and_keep_capacity () |
| void | rehash () |
| 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 (const int64_t n) |
Static Public Member Functions | |
| static bool | Intersects (const Set &a, const Set &b) |
| static bool | Disjoint (const Set &a, const Set &b) |
Friends | |
| bool | operator== (const Set &a, const Set &b) |
| bool | operator!= (const Set &a, const Set &b) |
| Key | Type of the elements that are stored in this set. It has to be movable. Furthermore, the hash and is-equal functions have to support it. |
| InlineBufferCapacity | The minimum number of elements that can be stored in this Set without doing a heap allocation. This is useful when you expect to have many small sets. However, keep in mind that (unlike vector) initializing a set has a O(n) cost in the number of slots. |
| ProbingStrategy | The strategy used to deal with collisions. They are defined in BLI_probing_strategies.hh. |
| Hash | The hash function used to hash the keys. There is a default for many types. See BLI_hash.hh for examples on how to define a custom hash function. |
| IsEqual | The equality operator used to compare keys. By default it will simply compare keys using the == operator. |
| Slot | This is what will actually be stored in the hash table array. At a minimum a slot has to be able to hold a key and information about whether the slot is empty, occupied or removed. Using a non-standard slot type can improve performance or reduce the memory footprint. For example, a hash can be stored in the slot, to make inequality checks more efficient. Some types have special values that can represent an empty or removed state, eliminating the need for an additional variable. Also see BLI_set_slots.hh. |
| Allocator | The allocator used by this set. Should rarely be changed, except when you don't want that MEM_* is used internally. |
Definition at line 106 of file BLI_set.hh.
| using blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::const_pointer = const Key * |
Definition at line 111 of file BLI_set.hh.
| using blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::const_reference = const Key & |
Definition at line 113 of file BLI_set.hh.
| using blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::iterator = Iterator |
Definition at line 114 of file BLI_set.hh.
| using blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::pointer = Key * |
Definition at line 110 of file BLI_set.hh.
| using blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::reference = Key & |
Definition at line 112 of file BLI_set.hh.
| using blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size_type = int64_t |
Definition at line 115 of file BLI_set.hh.
| using blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::value_type = Key |
Definition at line 109 of file BLI_set.hh.
|
inlinenoexcept |
Initialize an empty set. 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 168 of file BLI_set.hh.
Referenced by blender::Set< std::string >::clear(), and blender::io::usd::remap_blend_shape_anim().
|
inlinenoexcept |
Definition at line 177 of file BLI_set.hh.
|
inline |
Definition at line 179 of file BLI_set.hh.
|
inline |
Construct a set that contains the given keys. Duplicates will be removed automatically.
Definition at line 187 of file BLI_set.hh.
|
default |
|
default |
|
inlinenoexcept |
Definition at line 193 of file BLI_set.hh.
|
inline |
Add a key to the set. If the key exists in the set already, nothing is done. The return value is true if the key was newly added to the set.
This is similar to std::unordered_set::insert.
Definition at line 248 of file BLI_set.hh.
Referenced by blender::ed::sculpt_paint::cloth::add_constraints_for_verts(), blender::io::fbx::add_image_texture(), blender::ed::sculpt_paint::boundary::add_index(), blender::meshintersect::add_list_to_input_ids(), blender::Set< std::string >::add_multiple(), blender::bke::compositor::add_passes_used_by_cryptomatte_node(), blender::bke::compositor::add_passes_used_by_group_input_node(), blender::bke::compositor::add_passes_used_by_render_layer_node(), blender::ed::curves::pen_tool::add_single_point_and_curve(), blender::add_this_collection(), blender::meshintersect::add_to_input_ids(), blender::bke::compositor::add_used_passes_recursive(), blender::bke::AttributeAccessor::all_ids(), animchannels_rearrange_exec(), blender::ed::greasepencil::apply_eval_grease_pencil_data(), armature_find_selected_pose_bones(), blender::nodes::attribute_search_update_fn(), blender::io::hydra::CurvesData::available_materials(), blender::io::hydra::MeshData::available_materials(), blender::io::hydra::VolumeData::available_materials(), bevel_rebuild_existing_polygons(), BKE_action_flip_with_pose(), blender::bke::BKE_armature_find_selected_bone_names(), BKE_blendfile_link_pack(), BKE_id_multi_tagged_delete(), BKE_lib_override_library_main_hierarchy_root_ensure(), BKE_library_main_rebuild_hierarchy(), BKE_modifiers_persistent_uids_are_valid(), blender::bke::BKE_pose_channel_find_selected_names(), blendfile_append_define_actions(), blendfile_relocate_postprocess_cleanup(), BM_mesh_is_valid(), blender::ed::greasepencil::boundary_to_curves(), bpy_batch_remove(), blender::ed::asset::build_filtered_catalog_tree(), blender::fn::build_multi_function_procedure_for_fields(), buttons_texture_modifier_geonodes_users_add(), blender::bke::collect_used_previews(), blender::bke::id_hash::compute_deep_hash_recursive(), blender::geometry::copy_vertex_group_names(), blender::geometry::copy_vertex_group_names(), blender::asset_system::AssetCatalogService::create_catalog_filter(), blender::io::fbx::create_transform_curve_data(), blender::ed::transform::createTransGraphEditData(), blender::ed::transform::createTransObject(), blender::ed::space_node::cut_links_exec(), blender::animrig::deselect_keys_actions(), blender::draw::discard_buffers(), blender::bke::discover_tree_zones(), do_object_box_select(), ED_armature_join_objects_exec(), ED_image_save_all_modified_info(), ED_undo_editmode_bases_from_view_layer(), ED_undo_editmode_objects_from_view_layer(), blender::nodes::partial_eval::eval_downstream(), blender::nodes::partial_eval::eval_upstream(), blender::ed::asset::external_file_check_callback(), blender::ed::animrig::extract_pose(), blender::animrig::Channelbag::fcurve_create_many(), fcurve_path_rename(), blender::geometry::filter_builtin_attributes(), blender::gpu::shader::ShaderCreateInfo::finalize(), blender::io::fbx::find_all_bones(), blender::io::fbx::find_bones(), blender::bke::node_structure_type_inferencing::find_dynamic_output_linked_inputs(), blender::io::fbx::find_fake_bones(), blender::bke::node_field_inferencing::find_group_output_dependencies(), blender::nodes::find_origin_sockets_through_contexts(), blender::find_side_effect_nodes_for_active_gizmos(), blender::ed::geometry::find_socket_log_contexts(), blender::find_socket_log_contexts(), blender::nodes::geo_eval_log::GeoTreeLog::find_socket_value_log(), blender::ed::space_node::find_sockets_on_active_gizmo_paths(), blender::nodes::find_target_sockets_through_contexts(), blender::fn::find_varying_fields(), blender::bke::pbvh::Tree::flush_bounds_to_parents(), blender::nodes::gizmos::foreach_active_gizmo_in_open_node_editor(), blender::bke::attribute_accessor_functions::foreach_attribute(), blender::nodes::inverse_eval::foreach_element_on_inverse_eval_path(), blender::index_mask::IndexMask::from_initializers(), blender::ed::sculpt_paint::face_set::gather_hidden_face_sets(), blender::ed::geometry::gather_node_group_ids(), blender::ed::geometry::gather_supported_objects(), blender::geometry::gather_vert_attributes(), blender::nodes::node_geo_extrude_mesh_cc::gather_vert_attributes(), blender::nodes::node_geo_extrude_mesh_cc::gather_vert_attributes(), blender::bke::generate_unique_instance_ids(), blender::io::obj::geometry_to_blender_objects(), blender::nodes::geo_eval_log::GeometryInfoLog::GeometryInfoLog(), blender::ed::space_node::get_attribute_info_from_context(), blender::ed::greasepencil::get_bone_deformed_vertex_group_names(), blender::ed::greasepencil::get_editable_frames_for_layer(), blender::ed::space_node::get_grid_names_from_context(), blender::ed::space_node::get_layer_names_from_context(), blender::ed::sculpt_paint::greasepencil::WeightPaintOperation::get_locked_and_bone_deformed_vertex_groups(), blender::ed::greasepencil::get_selected_object_keyframes(), get_selected_pose_bones(), gpu_material_library_use_function(), blender::ed::greasepencil::grease_pencil_material_lock_unselected_exec(), blender::ed::greasepencil::grease_pencil_primitive_init_curves(), blender::ed::greasepencil::grease_pencil_primitive_update_curves(), blender::ed::vse::have_free_channels(), id_delete(), IDP_EnumItemsValidate(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_bmesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_bmesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_grids(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_mesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_grids(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_mesh(), blender::io::usd::import_blendshapes(), init_structDNA(), insert_key(), blender::ed::greasepencil::insert_selected_values(), blender::deg::is_reachable(), blender::bke::blendfile::PartialWriteContext::is_valid(), join_tracks_exec(), knife_find_line_hits(), blender::nodes::layer_name_search_update_fn(), blender::bke::greasepencil::convert::legacy_gpencil_sanitize_annotations(), lib_override_library_main_hierarchy_id_root_ensure(), lib_override_library_main_resync_on_library_indirect_level(), main_namemap_validate_and_fix(), make_selected_objects_local(), menu_items_from_ui_create(), menu_types_add_from_keymap_items(), blender::gpu::missing_capabilities_get(), blender::seq::modifier_persistent_uids_are_valid(), MOV_proxy_builder_start(), blender::ed::space_node::mute_links_exec(), nla_eval_domain_action(), blender::nodes::node_geo_attribute_capture_cc::node_geo_exec(), blender::ed::space_node::node_group_make_insert_selected(), blender::ed::space_node::node_remove_existing_links_if_needed(), blender::bke::ntree_contains_tree_exec(), ntree_shader_copy_branch(), blender::ed::outliner::outliner_select_sync_to_edit_bone(), blender::ed::outliner::outliner_select_sync_to_object(), blender::ed::outliner::outliner_select_sync_to_pose_bone(), blender::bke::library::pack_linked_id_hierarchy(), blender::asset_system::AssetCatalogService::parse_catalog_file(), blender::bke::pbvh::pbvh_bmesh_node_split(), pose_select_same_collection(), pose_select_same_color(), pose_select_siblings(), poselib_keytag_pose(), blender::fn::preprocess_field_tree(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_extension_sample(), blender::io::usd::process_scene_graph_instances(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_start_sample(), blender::asset_system::AssetCatalogService::prune_catalogs_by_path(), blender::asset_system::AssetCatalogService::purge_catalogs_not_listed(), rebuild_hierarchy_best_parent_find(), blender::animrig::internal::rebuild_slot_user_cache(), blender::asset_system::AssetCatalogService::reload_catalogs(), blender::asset_system::AssetLibrary::remap_ids_and_remove_invalid(), blender::ed::asset::index::AssetLibraryIndex::remove_broken_index_files(), blender::remove_outdated_bake_caches(), blender::ed::asset::index::AssetLibraryIndex::remove_unused_index_files(), blender::ed::geometry::run_node_group_exec(), screen_ctx_sel_actions_impl(), blender::ed::space_node::search_link_ops_for_asset_metadata(), blender::nodes::search_link_ops_for_declarations(), blender::ed::vse::select_grouped_effect(), select_similar_bone_collection(), blender::ed::greasepencil::select_similar_by_layer(), blender::ed::vse::sequencer_report_duplicates(), blender::ed::vse::sequencer_retiming_box_select_exec(), blender::ed::object::shade_smooth_exec(), similar_vert_select_exec(), blender::asset_system::tests::TEST(), blender::index_mask::tests::TEST(), blender::index_mask::tests::TEST(), blender::linear_allocator::tests::TEST(), blender::linear_allocator::tests::TEST(), blender::linear_allocator::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(), timeline_cache_draw_geometry_nodes(), blender::geometry::trim_curves(), ui_but_update_from_old_block(), blender::ed::space_node::update_nested_node_refs_after_moving_nodes_into_group(), blender::ed::spreadsheet::update_visible_columns(), blender::gpu::VKDescriptorSetPoolUpdator::upload_descriptor_sets(), blender::gpu::shader::ShaderCreateInfo::validate_merge(), and blender::ed::greasepencil::vertex_group_normalize_all_exec().
|
inline |
Definition at line 252 of file BLI_set.hh.
|
inline |
Definition at line 256 of file BLI_set.hh.
Referenced by blender::Set< std::string >::add(), blender::Set< std::string >::add(), blender::geometry::gather_attribute_propagation_components(), blender::geometry::gather_attribute_propagation_components_with_custom_depths(), get_used_lightgroups(), similar_vert_select_exec(), and blender::tests::TEST().
|
inline |
Convenience function to add many keys to the set at once. Duplicates are removed automatically.
We might be able to make this faster than sequentially adding all keys, but that is not implemented yet.
Definition at line 287 of file BLI_set.hh.
Referenced by blender::nodes::gizmos::foreach_active_gizmo_in_open_node_editor(), blender::ed::greasepencil::grease_pencil_primitive_update_curves(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_extension_sample(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_start_sample(), blender::tests::TEST(), and blender::nodes::node_geo_input_mesh_face_neighbors_cc::unique_num().
|
inline |
Convenience function to add many new keys to the set at once. The keys must not exist in the set before and there must not be duplicates in the array.
Definition at line 298 of file BLI_set.hh.
Referenced by blender::tests::TEST().
|
inline |
Add a new key to the set. This invokes undefined behavior when the key is in the set already. When you know for certain that a key is not in the set yet, use this method for better performance. This also expresses the intent better.
Definition at line 233 of file BLI_set.hh.
Referenced by blender::Set< std::string >::add_multiple_new(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_bmesh(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_grids(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_mesh(), blender::compositor::compute_number_of_needed_buffers(), blender::geometry::convert_curves_to_bezier(), blender::fn::multi_function::ProcedureDotExport::create_nodes(), do_render_compositor_scenes(), do_version_glare_node_bloom_strength_recursive(), do_version_glare_node_options_to_inputs_recursive(), do_versions_after_linking_440(), blender::ed::geometry::get_builtin_menus(), blender::modifier::greasepencil::get_drawing_infos_by_frame(), blender::modifier::greasepencil::get_drawing_infos_by_layer(), blender::io::usd::is_excluded_attr(), long_id_names_ensure_unique_id_names(), blender::io::AbstractHierarchyIterator::make_unique_name(), blender::draw::mesh_buffer_cache_create_requested_subdiv(), pose_backup_create(), blender::ed::greasepencil::retrieve_editable_drawings_grouped_per_frame(), blender::ed::object::root_catalogs_draw(), blender::tests::TEST(), blender::tests::TEST(), and blender::bke::greasepencil::validate_drawing_vertex_groups().
|
inline |
Definition at line 237 of file BLI_set.hh.
|
inline |
Similar to add but reinserts the key if it already exists. Using this only makes sense if the key contains additional data besides what affects the hash.
Definition at line 267 of file BLI_set.hh.
Referenced by blender::tests::TEST().
|
inline |
Definition at line 271 of file BLI_set.hh.
|
inline |
Definition at line 275 of file BLI_set.hh.
Referenced by blender::Set< std::string >::add_overwrite(), and blender::Set< std::string >::add_overwrite().
|
inline |
Definition at line 480 of file BLI_set.hh.
Referenced by blender::ed::geometry::build_extra_depsgraph(), blender::io::fbx::create_transform_curve_data(), blender::bke::pbvh::Tree::flush_bounds_to_parents(), blender::index_mask::IndexMask::from_initializers(), blender::ed::asset::has_external_files(), id_delete(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), and timeline_cache_draw_geometry_nodes().
|
inline |
Returns the number of available slots. This is mostly for debugging purposes.
Definition at line 603 of file BLI_set.hh.
|
inline |
Remove all elements. Under some circumstances clear_and_keep_capacity may be more efficient.
Definition at line 551 of file BLI_set.hh.
Referenced by blendfile_relocate_postprocess_cleanup(), blender::io::usd::USDHierarchyIterator::determine_point_instancers(), blender::bke::discover_tree_zones(), blender::tests::TEST(), and blender::update_depsgraph().
|
inline |
Remove all elements, but don't free the underlying memory.
This can be more efficient than using clear if approximately the same or more elements are added again afterwards. If way fewer elements are added instead, the cost of maintaining a large hash table can lead to very bad worst-case performance.
Definition at line 564 of file BLI_set.hh.
|
inline |
Returns true if the key is in the set.
This is similar to std::unordered_set::find() != std::unordered_set::end().
Definition at line 310 of file BLI_set.hh.
Referenced by blender::io::fbx::add_image_texture(), blender::io::fbx::add_image_textures(), blender::ed::greasepencil::apply_eval_grease_pencil_data(), blender::io::usd::utils::assign_materials(), blender::nodes::node_geo_extrude_mesh_cc::attribute_ids_by_domain(), blender::draw::gpencil::Instance::begin_sync(), bevel_rebuild_existing_polygons(), BKE_blendfile_link_pack(), BKE_library_main_rebuild_hierarchy(), blendfile_append_define_actions(), blender::ed::asset::build_filtered_catalog_tree(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_bmesh(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_grids(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_mesh(), blender::bke::can_read_node_type(), blender::nodes::node_geo_attribute_capture_cc::clean_unused_attributes(), blender::bke::id_hash::compute_deep_hash_recursive(), blender::compositor::compute_number_of_needed_buffers(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), blender::geometry::copy_vertex_group_names(), blender::geometry::copy_vertex_group_names(), blender::io::fbx::ArmatureImportContext::create_armature_bones(), blender::fn::multi_function::ProcedureDotExport::create_nodes(), blender::ed::transform::createTransObject(), curve_rename_fcurves(), blender::draw::discard_buffers(), blender::ed::sculpt_paint::geodesic::distances_create(), do_object_box_select(), do_render_compositor_scenes(), do_version_glare_node_bloom_strength_recursive(), do_version_glare_node_options_to_inputs_recursive(), do_versions_after_linking_440(), blender::fn::evaluate_fields(), blender::ed::animrig::extract_pose(), fcurve_path_rename(), blender::io::fbx::ArmatureImportContext::find_armatures(), blender::nodes::node_geo_extrude_mesh_cc::gather_vert_attributes(), blender::nodes::node_geo_extrude_mesh_cc::gather_vert_attributes(), blender::ed::greasepencil::get_bone_deformed_vertex_group_names(), blender::modifier::greasepencil::get_drawing_infos_by_frame(), blender::modifier::greasepencil::get_drawing_infos_by_layer(), blender::ed::greasepencil::get_editable_frames_for_layer(), blender::eevee::get_viewport_compositor_enabled_passes(), blender::ed::greasepencil::grease_pencil_material_lock_unselected_exec(), blender::ed::vse::have_free_channels(), id_delete(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_bmesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_bmesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_grids(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_mesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_grids(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_mesh(), blender::io::usd::import_blendshapes(), blender::geometry::interpolate_attribute_to_poly_curve(), blender::nodes::node_geo_extrude_mesh_cc::is_empty_domain(), blender::io::usd::is_excluded_attr(), blender::bke::blendfile::PartialWriteContext::is_valid(), blender::ed::mesh::join_generic_attributes(), blender::ed::greasepencil::keymap_grease_pencil_brush_stroke_poll(), knife_find_line_hits(), blender::bke::greasepencil::convert::legacy_gpencil_sanitize_annotations(), lib_override_root_hierarchy_set(), long_id_names_ensure_unique_id_names(), main_namemap_validate_and_fix(), blender::draw::mesh_buffer_cache_create_requested_subdiv(), blender::gpu::missing_capabilities_get(), blender::bke::node_preview_remove_unused(), ntree_shader_copy_branch(), blender::ed::object::object_parent_in_set(), blender::ed::outliner::outliner_select_sync_to_edit_bone(), blender::ed::outliner::outliner_select_sync_to_object(), blender::ed::outliner::outliner_select_sync_to_pose_bone(), pose_backup_create(), pose_bone_is_below_one_of(), pose_select_children(), pose_select_same_collection(), pose_select_same_color(), pose_select_siblings(), poselib_keytag_pose(), blender::asset_system::AssetCatalogService::purge_catalogs_not_listed(), rebuild_hierarchy_best_parent_find(), blender::remove_outdated_bake_caches(), blender::ed::greasepencil::retrieve_editable_drawings_grouped_per_frame(), blender::bke::CurvesGeometry::reverse_curves(), blender::ed::object::root_catalogs_draw(), blender::ed::sculpt_paint::geodesic::sculpt_geodesic_mesh_test_dist_add(), blender::ed::vse::select_grouped_effect(), select_similar_bone_collection(), blender::ed::greasepencil::select_similar_by_layer(), blender::geometry::subdivide_curves(), blender::index_mask::tests::TEST(), blender::index_mask::tests::TEST(), blender::linear_allocator::tests::TEST(), blender::linear_allocator::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::bke::tests::TEST_F(), ui_but_find_old(), ui_but_update_from_old_block(), blender::ed::spreadsheet::update_visible_columns(), blender::bke::greasepencil::validate_drawing_vertex_groups(), and blender::ed::object::xform_skip_child_container_item_ensure_from_array().
|
inline |
Definition at line 314 of file BLI_set.hh.
Referenced by blender::bke::attribute_filter_from_skip_ref(), blender::bke::attribute_filter_with_skip_ref(), blender::ed::geometry::catalog_assets_draw(), blender::Set< std::string >::contains(), ED_image_save_all_modified_info(), blender::io::AbstractHierarchyIterator::make_unique_name(), blender::ed::space_node::node_catalog_assets_draw(), blender::ed::space_node::root_catalogs_draw(), blender::bke::bake::serialize_attributes(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::ed::geometry::ui_template_node_operator_asset_root_items(), and view_layer_remove_unused_lightgroups_exec().
|
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 set.
Definition at line 543 of file BLI_set.hh.
|
inlinestatic |
Returns true if no key from a is also in b and vice versa.
Definition at line 665 of file BLI_set.hh.
Referenced by blender::tests::TEST(), and blender::tests::TEST().
|
inline |
Definition at line 490 of file BLI_set.hh.
Referenced by blender::Set< std::string >::begin(), blender::ed::geometry::build_extra_depsgraph(), blender::io::fbx::create_transform_curve_data(), blender::index_mask::IndexMask::from_initializers(), id_delete(), blender::tests::TEST(), blender::tests::TEST(), and timeline_cache_draw_geometry_nodes().
|
inlinestatic |
Returns true if there is a key that exists in both sets.
Definition at line 647 of file BLI_set.hh.
Referenced by blender::Set< std::string >::Disjoint(), blender::deg::RootPChanMap::has_common_root(), blender::Set< std::string >::Intersects(), blender::tests::TEST(), and blender::tests::TEST().
|
inline |
Returns true if no keys are stored.
Definition at line 595 of file BLI_set.hh.
Referenced by BKE_pose_backup_create_selected_bones(), blender::io::usd::USDStageReader::collect_readers(), blender::compositor::compute_number_of_needed_buffers(), blender::io::usd::USDHierarchyIterator::create_data_writer(), do_render_compositor_scenes(), ED_undo_editmode_bases_from_view_layer(), ED_undo_editmode_objects_from_view_layer(), blender::bke::pbvh::Tree::flush_bounds_to_parents(), blender::geometry::gather_vert_attributes(), blender::nodes::node_geo_extrude_mesh_cc::gather_vert_attributes(), blender::nodes::node_geo_extrude_mesh_cc::gather_vert_attributes(), blender::ed::asset::has_external_files(), blender::draw::mesh_buffer_cache_create_requested_subdiv(), blender::ed::space_node::mute_links_exec(), blender::nodes::node_geo_remove_attribute_cc::node_geo_exec(), blender::io::usd::process_scene_graph_instances(), blender::io::usd::remap_blend_shape_anim(), blender::ed::geometry::run_node_group_exec(), similar_vert_select_exec(), blender::linear_allocator::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), and blender::bke::tests::TEST_F().
|
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 set.
Definition at line 323 of file BLI_set.hh.
Referenced by blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), and blender::tests::TEST().
|
inline |
Definition at line 327 of file BLI_set.hh.
Referenced by blender::Set< std::string >::lookup_key().
|
inline |
Returns the key that is stored in the set that compares equal to the given key. If the key is not in the set, the given default value is returned instead.
Definition at line 336 of file BLI_set.hh.
Referenced by blender::tests::TEST().
|
inline |
Definition at line 341 of file BLI_set.hh.
Referenced by blender::Set< std::string >::lookup_key_default().
|
inline |
Returns the key in the set that compares equal to the given key. If it does not exist, the key is newly added.
Definition at line 367 of file BLI_set.hh.
Referenced by blender::tests::TEST().
|
inline |
Definition at line 371 of file BLI_set.hh.
|
inline |
Definition at line 375 of file BLI_set.hh.
Referenced by blender::Set< std::string >::lookup_key_or_add(), and blender::Set< std::string >::lookup_key_or_add().
|
inline |
Returns a pointer to the key that is stored in the set that compares equal to the given key. If the key is not in the set, nullptr is returned instead.
Definition at line 354 of file BLI_set.hh.
Referenced by blender::tests::TEST().
|
inline |
Definition at line 358 of file BLI_set.hh.
Referenced by blender::Set< std::string >::lookup_key_ptr().
|
inline |
Definition at line 218 of file BLI_set.hh.
|
inline |
Definition at line 223 of file BLI_set.hh.
|
inline |
Print common statistics like size and collision count. This is useful for debugging purposes.
Definition at line 533 of file BLI_set.hh.
|
inline |
Creates a new slot array and reinserts all keys inside of that. This method can be used to get rid of removed slots. Also this is useful for benchmarking the grow function.
Definition at line 579 of file BLI_set.hh.
|
inline |
Remove the key that the iterator is currently pointing at. It is valid to call this method while iterating over the set. However, after this method has been called, the removed element must not be accessed anymore.
Definition at line 500 of file BLI_set.hh.
|
inline |
Deletes the key from the set. Returns true when the key did exist beforehand, otherwise false.
This is similar to std::unordered_set::erase.
Definition at line 385 of file BLI_set.hh.
Referenced by blender::ed::greasepencil::apply_eval_grease_pencil_data(), BKE_blendfile_link_pack(), blendfile_relocate_postprocess_cleanup(), blender::bke::id_hash::compute_deep_hash_recursive(), blender::bke::pbvh::Tree::flush_bounds_to_parents(), knife_find_line_hits(), menu_items_from_ui_create(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::nodes::node_geo_dual_mesh_cc::transfer_attributes(), and blender::geometry::trim_curves().
|
inline |
Definition at line 389 of file BLI_set.hh.
Referenced by blender::Set< std::string >::remove(), blender::bke::compare_geometry::sort_domain_using_attributes(), blender::tests::TEST(), and blender::tests::TEST().
|
inline |
Deletes the key from the set. This invokes undefined behavior when the key is not in the map.
Definition at line 397 of file BLI_set.hh.
Referenced by blender::geometry::point_merge_by_distance(), blender::tests::TEST(), blender::tests::TEST(), and blender::tests::TEST().
|
inline |
Definition at line 401 of file BLI_set.hh.
Referenced by blender::Set< std::string >::remove_contained(), and blender::tests::TEST().
|
inline |
Remove all values for which the given predicate is true and return the number of removed values.
This is similar to std::erase_if.
Definition at line 515 of file BLI_set.hh.
Referenced by blender::bke::compare_geometry::sort_domain_using_attributes(), blender::tests::TEST(), blender::nodes::node_geo_dual_mesh_cc::transfer_attributes(), and blender::bke::compare_geometry::verify_attributes_compatible().
|
inline |
Returns the amount of removed slots in the set. This is mostly for debugging purposes.
Definition at line 611 of file BLI_set.hh.
|
inline |
Potentially resize the set such that it can hold the specified number of keys without another grow operation.
Definition at line 637 of file BLI_set.hh.
Referenced by blender::draw::discard_buffers(), blender::animrig::Channelbag::fcurve_create_many(), blender::bke::pbvh::Tree::flush_bounds_to_parents(), blender::bke::generate_unique_instance_ids(), IDP_EnumItemsValidate(), blender::io::usd::import_blendshapes(), blender::io::usd::import_skeleton(), and UI_block_update_from_old().
|
inline |
Returns the number of keys stored in the set.
Definition at line 587 of file BLI_set.hh.
Referenced by BKE_modifiers_persistent_uids_are_valid(), ED_undo_editmode_objects_from_view_layer(), blender::ed::geometry::gather_node_group_ids(), blender::ed::asset::has_external_files(), id_delete(), blender::Set< std::string >::Intersects(), blender::seq::modifier_persistent_uids_are_valid(), blender::Set< std::string >::operator==, blender::Set< std::string >::rehash(), blender::Set< std::string >::remove_if(), blender::ed::vse::sequencer_report_duplicates(), blender::ed::vse::sequencer_retiming_box_select_exec(), blender::index_mask::tests::TEST(), blender::linear_allocator::tests::TEST(), blender::linear_allocator::tests::TEST(), blender::linear_allocator::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_input_mesh_face_neighbors_cc::unique_num(), and blender::gpu::VKDescriptorSetPoolUpdator::upload_descriptor_sets().
|
inline |
Returns the approximate memory requirements of the set in bytes. This is more correct for larger sets.
Definition at line 628 of file BLI_set.hh.
|
inline |
Returns the bytes required per element. This is mostly for debugging purposes.
Definition at line 619 of file BLI_set.hh.
|
friend |
Definition at line 683 of file BLI_set.hh.
|
friend |
Definition at line 670 of file BLI_set.hh.