Blender
V3.3
|
Go to the source code of this file.
Typedefs | |
typedef struct StringSearch | StringSearch |
Functions | |
StringSearch * | BLI_string_search_new (void) |
void | BLI_string_search_add (StringSearch *search, const char *str, void *user_data, int weight) |
int | BLI_string_search_query (StringSearch *search, const char *query, void ***r_data) |
void | BLI_string_search_free (StringSearch *search) |
typedef struct StringSearch StringSearch |
Definition at line 1 of file BLI_string_search.h.
void BLI_string_search_add | ( | StringSearch * | search, |
const char * | str, | ||
void * | user_data, | ||
int | weight | ||
) |
Add a new possible result to the search. The caller keeps ownership of all parameters.
weight | Can be used to customize the order when multiple items have the same match score. |
Definition at line 412 of file string_search.cc.
References StringSearch::allocator, blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), blender::LinearAllocator< Allocator >::construct_array_copy(), blender::string_search::extract_normalized_words(), StringSearch::items, str, and user_data.
Referenced by blender::ui::attribute_search_add_items(), id_search_cb(), id_search_cb_tagged(), blender::ed::space_node::link_drag_search_update_fn(), menu_search_update_fn(), blender::ed::space_node::node_find_update_fn(), operator_enum_search_update_fn(), and ui_rna_collection_search_update_fn().
void BLI_string_search_free | ( | StringSearch * | search | ) |
Definition at line 487 of file string_search.cc.
Referenced by blender::ui::attribute_search_add_items(), id_search_cb(), id_search_cb_tagged(), blender::ed::space_node::link_drag_search_update_fn(), menu_search_update_fn(), blender::ed::space_node::node_find_update_fn(), and operator_enum_search_update_fn().
StringSearch* BLI_string_search_new | ( | void | ) |
Definition at line 407 of file string_search.cc.
Referenced by blender::ui::attribute_search_add_items(), id_search_cb(), id_search_cb_tagged(), blender::ed::space_node::link_drag_search_update_fn(), menu_search_update_fn(), blender::ed::space_node::node_find_update_fn(), operator_enum_search_update_fn(), and ui_rna_collection_search_update_fn().
int BLI_string_search_query | ( | StringSearch * | search, |
const char * | query, | ||
void *** | r_data | ||
) |
Filter and sort all previously added search items. Returns an array containing the filtered user data. The caller has to free the returned array.
Definition at line 427 of file string_search.cc.
References Freestyle::a, blender::MultiValueMap< Key, Value >::add(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), AT, usdtokens::b(), blender::Vector< T, InlineBufferCapacity, Allocator >::begin(), blender::Vector< T, InlineBufferCapacity, Allocator >::end(), blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), blender::string_search::extract_normalized_words(), blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), indices, blender::StringRefBase::is_empty(), StringSearch::items, blender::MultiValueMap< Key, Value >::keys(), blender::MultiValueMap< Key, Value >::lookup(), MEM_malloc_arrayN, query, blender::string_search::score_query_against_words(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), sort(), and SearchItem::user_data.
Referenced by blender::ui::attribute_search_add_items(), id_search_cb(), id_search_cb_tagged(), blender::ed::space_node::link_drag_search_update_fn(), menu_search_update_fn(), blender::ed::space_node::node_find_update_fn(), and operator_enum_search_update_fn().