Blender
V3.3
|
#include <stdlib.h>
#include "MEM_guardedalloc.h"
#include "BLI_linklist.h"
#include "BLI_memarena.h"
#include "BLI_mempool.h"
#include "BLI_utildefines.h"
#include "BLI_strict_flags.h"
#include "list_sort_impl.h"
Go to the source code of this file.
Macros | |
#define | SORT_IMPL_LINKTYPE LinkNode |
#define | SORT_IMPL_LINKTYPE_DATA link |
#define | SORT_IMPL_FUNC linklist_sort_fn |
#define | SORT_IMPL_USE_THUNK |
#define | SORT_IMPL_FUNC linklist_sort_fn_r |
Routines for working with single linked lists of 'links' - pointers to other data.
For double linked lists see 'BLI_listbase.h'.
Definition in file BLI_linklist.c.
#define SORT_IMPL_FUNC linklist_sort_fn |
Definition at line 313 of file BLI_linklist.c.
#define SORT_IMPL_FUNC linklist_sort_fn_r |
Definition at line 313 of file BLI_linklist.c.
Definition at line 303 of file BLI_linklist.c.
#define SORT_IMPL_LINKTYPE_DATA link |
Definition at line 304 of file BLI_linklist.c.
#define SORT_IMPL_USE_THUNK |
Definition at line 312 of file BLI_linklist.c.
void BLI_linklist_append | ( | LinkNodePair * | list_pair, |
void * | ptr | ||
) |
Definition at line 195 of file BLI_linklist.c.
References BLI_linklist_append_nlink(), MEM_mallocN, and ptr.
Referenced by add_edge_constraint(), BKE_lib_override_library_main_proxy_convert(), BLI_file_read_as_lines(), bone_mouse_select_menu(), cloth_add_shear_bend_spring(), cmp_node_image_add_pass_output(), lib_override_resync_tagging_finalize_recurse(), and object_mouse_select_menu().
void BLI_linklist_append_arena | ( | LinkNodePair * | list_pair, |
void * | ptr, | ||
MemArena * | ma | ||
) |
Definition at line 201 of file BLI_linklist.c.
References BLI_linklist_append_nlink(), BLI_memarena_alloc(), and ptr.
void BLI_linklist_append_nlink | ( | LinkNodePair * | list_pair, |
void * | ptr, | ||
LinkNode * | nlink | ||
) |
Definition at line 178 of file BLI_linklist.c.
References BLI_assert, LinkNodePair::last_node, LinkNode::link, LinkNodePair::list, LinkNode::next, NULL, and ptr.
Referenced by BLI_linklist_append(), BLI_linklist_append_arena(), and BLI_linklist_append_pool().
void BLI_linklist_append_pool | ( | LinkNodePair * | list_pair, |
void * | ptr, | ||
BLI_mempool * | mempool | ||
) |
Definition at line 207 of file BLI_linklist.c.
References BLI_linklist_append_nlink(), BLI_mempool_alloc(), and ptr.
void BLI_linklist_apply | ( | LinkNode * | list, |
LinkNodeApplyFP | applyfunc, | ||
void * | userdata | ||
) |
Definition at line 294 of file BLI_linklist.c.
References LinkNode::link, and LinkNode::next.
int BLI_linklist_count | ( | const LinkNode * | list | ) |
Definition at line 23 of file BLI_linklist.c.
References len, and LinkNode::next.
Referenced by bm_uuidwalk_pass_add(), collada_export(), drw_debug_draw_lines(), drw_debug_draw_spheres(), and filelist_readjob_list_lib().
Definition at line 47 of file BLI_linklist.c.
References LinkNode::next, and NULL.
Referenced by BKE_blendfile_link_append_context_item_idtypes_from_library_add().
Definition at line 60 of file BLI_linklist.c.
References LinkNode::next.
void BLI_linklist_free | ( | LinkNode * | list, |
LinkNodeFreeFP | freefunc | ||
) |
Definition at line 254 of file BLI_linklist.c.
References LinkNode::link, MEM_freeN, LinkNode::next, and next.
Referenced by add_face_constraints(), BKE_crazyspace_get_first_deform_matrices_editbmesh(), BKE_lib_override_library_create_from_tag(), BKE_lib_override_library_main_proxy_convert(), BKE_libblock_relink_to_newid(), bone_mouse_select_menu(), cloth_free_edgelist(), cloth_free_errorsprings(), cloth_free_modifier(), cloth_free_modifier_extern(), cmp_node_image_verify_outputs(), collada_export(), ED_file_indexer_entries_clear(), editbmesh_calc_modifiers(), file_read_reports_finalize(), lib_override_library_main_resync_on_library_indirect_level(), lib_override_library_remap(), lib_override_library_resync(), lineart_gpencil_bake_common(), lineart_gpencil_bake_endjob(), make_links_data_exec(), mesh_calc_modifiers(), mouse_mesh_shortest_path_edge(), mouse_mesh_shortest_path_face(), mouse_mesh_shortest_path_vert(), mouse_mesh_uv_shortest_path_edge(), mouse_mesh_uv_shortest_path_face(), mouse_mesh_uv_shortest_path_vert(), and object_mouse_select_menu().
void BLI_linklist_free_pool | ( | LinkNode * | list, |
LinkNodeFreeFP | freefunc, | ||
struct BLI_mempool * | mempool | ||
) |
Definition at line 268 of file BLI_linklist.c.
References BLI_mempool_free(), LinkNode::link, LinkNode::next, and next.
Referenced by bm_edgenet_path_calc(), bm_edgenet_path_calc_best(), BM_mesh_edgenet(), bm_mesh_region_match_pair(), and bm_uuidwalk_init_from_edge().
Definition at line 282 of file BLI_linklist.c.
References LinkNode::link, MEM_freeN, LinkNode::next, and next.
Referenced by _bpy_names(), BLI_file_free_lines(), BLO_main_validate_libraries(), filelist_readjob_list_lib(), knifeproject_exec(), and ui_multibut_free().
Definition at line 34 of file BLI_linklist.c.
References LinkNode::link, LinkNode::next, and ptr.
Referenced by bc_is_in_Export_set(), cmp_node_image_verify_outputs(), do_render_strip_uncached(), drw_select_filter_object_mode_lock_for_weight_paint(), ghash_insert_link(), intersect_line_tri(), and lib_override_library_main_resync_on_library_indirect_level().
Definition at line 237 of file BLI_linklist.c.
References LinkNode::link, MEM_mallocN, LinkNode::next, node, NULL, and ptr.
Move an item from its current position to a new one inside a single-linked list.
*listp
may be modified. Definition at line 86 of file BLI_linklist.c.
References LinkNode::next, and NULL.
Referenced by bookmark_move_exec().
Definition at line 213 of file BLI_linklist.c.
References MEM_freeN, and next.
Referenced by DRW_cache_free_old_subdiv(), flatten_group_do(), gpu_free_unused_buffers(), menu_items_from_ui_create(), and remove_outer_edges_until_constraints().
void* BLI_linklist_pop_pool | ( | struct LinkNode ** | listp, |
struct BLI_mempool * | mempool | ||
) |
Definition at line 225 of file BLI_linklist.c.
References BLI_mempool_free(), and next.
Definition at line 160 of file BLI_linklist.c.
References BLI_linklist_prepend_nlink(), MEM_mallocN, and ptr.
Referenced by BKE_lib_override_library_create_from_tag(), BKE_object_groups(), BLO_blendhandle_get_datablock_info(), BLO_blendhandle_get_datablock_names(), BLO_blendhandle_get_linkable_groups(), BLO_blendhandle_get_previews(), BM_face_triangulate(), BM_mesh_calc_path_edge(), BM_mesh_calc_path_face(), BM_mesh_calc_path_uv_edge(), BM_mesh_calc_path_uv_face(), BM_mesh_calc_path_uv_vert(), BM_mesh_calc_path_vert(), cloth_add_shear_bend_spring(), cloth_build_springs(), DRW_subdiv_cache_free(), ED_file_indexer_entries_extend_from_datablock_infos(), flatten_group_do(), image_free_gpu(), blender::ed::asset::index::init_indexer_entries_from_value(), knifeproject_poly_from_object(), lib_override_library_main_resync_on_library_indirect_level(), lib_override_library_remap(), lib_override_library_resync(), libblock_relink_to_newid_prepare_data(), lineart_gpencil_bake_common(), menu_items_from_ui_create(), menu_types_add_from_keymap_items(), mesh_calc_path_region_elem(), obrel_list_add(), remove_outer_edges_until_constraints(), and ui_multibut_add().
Definition at line 166 of file BLI_linklist.c.
References BLI_linklist_prepend_nlink(), BLI_memarena_alloc(), and ptr.
Definition at line 153 of file BLI_linklist.c.
References LinkNode::link, LinkNode::next, and ptr.
Referenced by BLI_linklist_prepend(), BLI_linklist_prepend_arena(), and BLI_linklist_prepend_pool().
void BLI_linklist_prepend_pool | ( | LinkNode ** | listp, |
void * | ptr, | ||
BLI_mempool * | mempool | ||
) |
Definition at line 172 of file BLI_linklist.c.
References BLI_linklist_prepend_nlink(), BLI_mempool_alloc(), and ptr.
Definition at line 70 of file BLI_linklist.c.
Referenced by BKE_modifier_calc_data_masks(), bm_edgenet_path_calc(), and DRW_pass_sort_shgroup_reverse().
Definition at line 321 of file BLI_linklist.c.
References LinkNode::next.
Referenced by bm_mesh_loops_calc_normals_for_vert_with_clnors().
LinkNode* BLI_linklist_sort_r | ( | LinkNode * | list, |
int(*)(void *, const void *, const void *) | cmp, | ||
void * | thunk | ||
) |
Definition at line 329 of file BLI_linklist.c.
References LinkNode::next.