|
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 (const Map &other)=default | |
| Map (Map &&other) noexcept(std::is_nothrow_move_constructible_v< SlotArray >) | |
| ~Map ()=default | |
| 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) |
| void | remove (const BaseIterator &iterator) |
| 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 () |
| 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) |
| Key | Type of the keys stored in the map. Keys have to be movable. Furthermore, the hash and is-equal functions have to support it. |
| Value | Type of the value that is stored per key. It has to be movable as well. |
| InlineBufferCapacity | The minimum number of elements that can be stored in this Map without doing a heap allocation. This is useful when you expect to have many small maps. However, keep in mind that (unlike vector) initializing a map 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, a value 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 some types. Slot types are defined in BLI_map_slots.hh |
| Allocator | The allocator used by this map. Should rarely be changed, except when you don't want that MEM_* is used internally. |
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 |
|
inlinenoexcept |
Definition at line 203 of file BLI_map.hh.
|
default |
|
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.
Referenced by BKE_blendfile_link_append_context_item_newid_set(), BKE_mesh_validate_arrays(), blf_glyph_cache_add_blank(), blf_glyph_cache_add_glyph(), blf_glyph_cache_add_svg(), blo_read_shared_impl(), BLO_write_shared(), grease_pencil_layer_initialize_trans_data(), blender::bke::greasepencil::convert::legacy_gpencil_object(), blender::bke::greasepencil::convert::legacy_main(), new_id_to_item_mapping_add(), blender::bke::greasepencil::tests::TEST(), and version_geometry_nodes_extrude_smooth_propagation().
|
inline |
Definition at line 275 of file BLI_map.hh.
|
inline |
Definition at line 279 of file BLI_map.hh.
|
inline |
Definition at line 283 of file BLI_map.hh.
|
inline |
Definition at line 288 of file BLI_map.hh.
|
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::greasepencil::Layer::add_frame(), BKE_main_library_weak_reference_add_item(), BKE_main_mesh_legacy_convert_auto_smooth(), BLO_memfile_write_init(), blender::nodes::initialize_zone_wrapper(), blender::seq::media_presence_is_missing(), blender::io::obj::OBJParser::parse(), Freestyle::BlenderStrokeRenderer::RenderStrokeRepBasic(), reorder_layer_data(), and version_geometry_nodes_replace_transfer_attribute_node().
|
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.
|
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 ED_image_paint_tile_push().
|
inline |
Definition at line 464 of file BLI_map.hh.
|
inline |
Definition at line 470 of file BLI_map.hh.
|
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::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::seq::media_presence_set_missing(), oldnewmap_insert(), and blender::ui::string_search::read_recent_searches_file().
|
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.
|
inline |
Returns the number of available slots. This is mostly for debugging purposes.
Definition at line 945 of file BLI_map.hh.
|
inline |
Removes all key-value-pairs from the map.
Definition at line 989 of file BLI_map.hh.
Referenced by direct_link_id(), DRW_view_data_reset(), blender::ed::greasepencil::duplicate_layer_and_frames(), grease_pencil_layer_apply_trans_data(), blender::ed::greasepencil::grease_pencil_layer_duplicate_exec(), grease_pencil_layer_initialize_trans_data(), image_undosys_step_encode(), main_namemap_populate(), and blender::ui::string_search::read_recent_searches_file().
|
inline |
Removes all key-value-pairs from the map and frees any allocated memory.
Definition at line 1003 of file BLI_map.hh.
Referenced by BLO_memfile_write_finalize(), and oldnewmap_clear().
|
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 BKE_blendfile_link_append_context_item_newid_set(), BKE_mesh_validate_arrays(), blender::ed::sculpt_paint::ensure_editable_drawings(), grease_pencil_layer_apply_trans_data(), grease_pencil_layer_initialize_trans_data(), grease_pencil_layer_update_trans_data(), blender::ed::greasepencil::grease_pencil_paste_keyframes(), Freestyle::BlenderStrokeRenderer::RenderStrokeRepBasic(), reorder_layer_data(), retime_key_draw(), and sequencer_retiming_draw_continuity().
|
inline |
Definition at line 333 of file BLI_map.hh.
|
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.
Referenced by BKE_grease_pencil_point_coords_apply(), BKE_grease_pencil_point_coords_apply_with_mat4(), BKE_grease_pencil_point_coords_get(), and BKE_grease_pencil_stroke_point_count().
|
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::io::obj::OBJParser::parse(), reorder_layer_data(), and blender::ui::string_search::write_recent_searches_file().
|
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.
|
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.
Referenced by blender::ed::object::apply_grease_pencil_for_modifier_all_keyframes(), BKE_cryptomatte_store_metadata(), count_grease_pencil_frames(), blender::ed::greasepencil::create_keyframe_edit_data_selected_frames_list(), blender::ed::greasepencil::duplicate_layer_and_frames(), blender::ed::greasepencil::duplicate_selected_frames(), Freestyle::BlenderStrokeRenderer::GenerateStrokeMesh(), blender::ed::greasepencil::get_editable_frames_for_layer(), get_keyframe_extents(), blender::ed::greasepencil::get_minmax_selected_frame_numbers(), grease_pencil_cels_to_keylist(), blender::ed::greasepencil::grease_pencil_copy_keyframes(), grease_pencil_layer_apply_trans_data(), blender::ed::greasepencil::grease_pencil_layer_duplicate_exec(), grease_pencil_layer_initialize_trans_data(), blender::ed::greasepencil::has_any_frame_selected(), blender::nodes::initialize_zone_wrapper(), blender::ed::greasepencil::merge_layers(), blender::ed::greasepencil::mirror_selected_frames(), blender::ed::greasepencil::remove_all_selected_frames(), blender::ed::greasepencil::retrieve_editable_drawings_grouped_per_frame(), blender::ed::greasepencil::select_all_frames(), blender::ed::greasepencil::select_frames_range(), blender::ed::greasepencil::select_frames_region(), blender::ed::greasepencil::snap_selected_frames(), 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.
Referenced by blender::ed::greasepencil::grease_pencil_paste_keyframes(), and blender::ed::greasepencil::join_object_with_active().
|
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 BKE_main_library_weak_reference_remove_item(), BKE_main_library_weak_reference_update_item(), BKE_mesh_validate_arrays(), blender::gpu::render_graph::VKRenderGraphLink::debug_print(), blender::ed::greasepencil::get_visible_frames_for_layer(), grease_pencil_layer_update_trans_data(), blender::ed::greasepencil::join_object_with_active(), blender::bke::greasepencil::Layer::prepare_for_dna_write(), blender::bke::greasepencil::Layer::remove_frame(), 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::bke::greasepencil::tests::TEST(), blender::bke::greasepencil::tests::TEST(), blender::bke::greasepencil::tests::TEST(), blender::bke::greasepencil::tests::TEST(), blender::bke::greasepencil::tests::TEST(), and blender::deg::unregister_graph().
|
inline |
Definition at line 520 of file BLI_map.hh.
|
inline |
Definition at line 514 of file BLI_map.hh.
|
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 BKE_main_library_weak_reference_search_item(), blo_read_shared_impl(), blender::bke::bNodeTreeZone::contains_node_recursively(), Freestyle::BlenderStrokeRenderer::GenerateStrokeMesh(), grease_pencil_layer_update_trans_data(), blender::bke::greasepencil::convert::legacy_gpencil_object(), blender::bke::greasepencil::convert::legacy_main(), mywrite_id_begin(), and version_geometry_nodes_extrude_smooth_propagation().
|
inline |
Definition at line 536 of file BLI_map.hh.
|
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.
|
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.
|
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(), namemap_add_name(), blender::ed::space_node::node_preview_acquire_ibuf(), blender::io::obj::OBJParser::parse(), and blender::realtime_compositor::Profiler::set_node_evaluation_time().
|
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.
|
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 BKE_main_namemap_get_name(), DRW_view_data_pass_texture_get(), 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.
|
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 main_namemap_populate().
|
inline |
Definition at line 605 of file BLI_map.hh.
|
inline |
Definition at line 609 of file BLI_map.hh.
|
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::bke::cryptomatte::BKE_cryptomatte_layer_get(), BKE_cryptomatte_material_hash(), BKE_cryptomatte_object_hash(), BKE_main_mesh_legacy_convert_auto_smooth(), blo_read_shared_impl(), blender::ed::space_node::compositor_accumulate_frame_node_execution_time(), blender::ed::space_node::compositor_node_get_execution_time(), ED_image_paint_tile_find(), blender::bke::greasepencil::Layer::frame_at(), blender::bke::greasepencil::Layer::frame_at(), blender::deg::get_all_registered_graphs(), blender::bke::greasepencil::Layer::get_frame_duration_at(), blender::bke::greasepencil::convert::legacy_main(), blender::seq::media_presence_is_missing(), namemap_remove_name(), oldnewmap_lookup_and_inc(), blender::ed::greasepencil::select_frame_at(), and blender::ed::space_node::shader_preview_startjob().
|
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().
|
inline |
Definition at line 227 of file BLI_map.hh.
|
inline |
Definition at line 232 of file BLI_map.hh.
|
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.
Referenced by reorder_layer_data().
|
inline |
Definition at line 382 of file BLI_map.hh.
|
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.
|
inline |
Definition at line 419 of file BLI_map.hh.
|
inline |
Definition at line 424 of file BLI_map.hh.
|
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.
|
inline |
Definition at line 399 of file BLI_map.hh.
|
inline |
Print common statistics like size and collision count. This is useful for debugging purposes.
Definition at line 918 of file BLI_map.hh.
|
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.
|
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::seq::media_presence_invalidate_sound(), blender::seq::media_presence_invalidate_strip(), namemap_remove_name(), and blender::deg::unregister_graph().
|
inline |
Definition at line 348 of file BLI_map.hh.
Referenced by grease_pencil_layer_initialize_trans_data().
|
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.
|
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.
|
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 BKE_mesh_validate_arrays(), laplacian_system_construct_end(), and reorder_layer_data().
|
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 Freestyle::BlenderStrokeRenderer::GenerateStrokeMesh(), blender::io::obj::OBJParser::parse(), Freestyle::BlenderStrokeRenderer::RenderStrokeRepBasic(), reorder_layer_data(), sequencer_retiming_mode_is_active(), 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::bke::greasepencil::tests::TEST(), blender::bke::greasepencil::tests::TEST(), blender::bke::greasepencil::tests::TEST(), blender::bke::greasepencil::tests::TEST(), and blender::ed::greasepencil::tests::TEST().
|
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.
Referenced by BKE_main_namemap_destroy().
|
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.
|
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.
Referenced by change_link_placeholder_to_real_ID_pointer_fd(), DRW_view_data_reset(), grease_pencil_layer_apply_trans_data(), image_undosys_step_encode(), oldnewmap_clear(), ptile_invalidate_map(), ptile_restore_runtime_map(), and blender::ed::greasepencil::set_selected_frames_type().
|
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.