|
Blender
V2.59
|
#include "MEM_guardedalloc.h"#include "BLI_utildefines.h"#include "BLI_ghash.h"#include "BLO_sys_types.h"Go to the source code of this file.
Functions | |
| GHash * | BLI_ghash_new (GHashHashFP hashfp, GHashCmpFP cmpfp, const char *info) |
| int | BLI_ghash_size (GHash *gh) |
| void | BLI_ghash_free (GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp) |
| GHashIterator * | BLI_ghashIterator_new (GHash *gh) |
| void | BLI_ghashIterator_init (GHashIterator *ghi, GHash *gh) |
| void | BLI_ghashIterator_free (GHashIterator *ghi) |
| void * | BLI_ghashIterator_getKey (GHashIterator *ghi) |
| void * | BLI_ghashIterator_getValue (GHashIterator *ghi) |
| void | BLI_ghashIterator_step (GHashIterator *ghi) |
| int | BLI_ghashIterator_isDone (GHashIterator *ghi) |
| unsigned int | BLI_ghashutil_ptrhash (const void *key) |
| int | BLI_ghashutil_ptrcmp (const void *a, const void *b) |
| unsigned int | BLI_ghashutil_inthash (const void *ptr) |
| int | BLI_ghashutil_intcmp (const void *a, const void *b) |
| unsigned int | BLI_ghashutil_strhash (const void *ptr) |
| int | BLI_ghashutil_strcmp (const void *a, const void *b) |
Variables | |
| unsigned int | hashsizes [] |
Definition in file BLI_ghash.c.
| void BLI_ghash_free | ( | GHash * | gh, |
| GHashKeyFreeFP | keyfreefp, | ||
| GHashValFreeFP | valfreefp | ||
| ) |
Definition at line 78 of file BLI_ghash.c.
References BLI_mempool_destroy(), GHash::buckets, GHash::entrypool, i, MEM_freeN(), GHash::nbuckets, GHash::nentries, Entry::next, and NULL.
Referenced by animdata_filter_remove_duplis(), applyModifier(), BIF_freeTemplates(), BIF_makeListTemplates(), BKE_icons_free(), BKE_nlastrip_validate_name(), BLI_argsFree(), BLI_pbvh_get_grid_updates(), BLO_blendhandle_get_linkable_groups(), BME_free_transdata(), build_mesh_leaf_node(), cloneRigGraph(), cloth_bvh_objcollisions_nearcheck(), codegen_set_unique_ids(), ConvertCSGDescriptorsToDerivedMesh(), createSlideVerts(), esubdivideflag(), free_editNurb_keyIndex(), free_forest(), free_mesh_orco_hash(), free_pose_channels_hash(), free_scratch(), free_sss(), free_undoCurve(), freeSlideVerts(), game_copy_pose(), GPU_extensions_exit(), imb_thread_cache_exit(), imb_tile_cache_exit(), knife_cut_exec(), mesh_get_x_mirror_faces(), REEB_freeArc(), RIG_freeRigGraph(), RNA_exit(), seq_stripelem_cache_cleanup(), seq_stripelem_cache_destruct(), strand_shade_cache_free(), undoCurve_to_editCurve(), WM_menutype_free(), wm_operatortype_free(), and wpaint_make_validmap().
| GHash* BLI_ghash_new | ( | GHashHashFP | hashfp, |
| GHashCmpFP | cmpfp, | ||
| const char * | info | ||
| ) |
Definition at line 54 of file BLI_ghash.c.
References BLI_mempool_create(), GHash::buckets, GHash::cmpfp, GHash::cursize, GHash::entrypool, GHash::hashfp, hashsizes, MEM_mallocN(), GHash::nbuckets, and GHash::nentries.
Referenced by animdata_filter_remove_duplis(), applyModifier(), BIF_makeListTemplates(), BKE_icons_init(), BKE_nlastrip_validate_name(), BLI_argsInit(), BLI_pbvh_get_grid_updates(), BLO_blendhandle_get_linkable_groups(), BME_init_transdata(), build_mesh_leaf_node(), cloneRigGraph(), cloth_bvh_objcollisions_nearcheck(), codegen_set_unique_ids(), ConvertCSGDescriptorsToDerivedMesh(), copyArc(), createArc(), createSlideVerts(), dag_add_node(), dupli_keyIndexHash(), esubdivideflag(), game_copy_pose(), get_object_orco(), GPU_lookup_function(), imb_thread_cache_init(), IMB_tile_cache_params(), init_editNurb_keyIndex(), knife_cut_exec(), make_pose_channels_hash(), make_sss_tree(), mesh_get_x_mirror_faces(), newRigGraph(), RNA_init(), sb_new_scratch(), seq_stripelem_cache_cleanup(), seq_stripelem_cache_init(), set_object_orco(), strand_shade_cache_create(), WM_menutype_init(), wm_operatortype_init(), and wpaint_make_validmap().
| int BLI_ghash_size | ( | GHash * | gh | ) |
Definition at line 74 of file BLI_ghash.c.
References GHash::nentries.
Referenced by applyModifier(), BIF_listTemplates(), BLI_pbvh_get_grid_updates(), filterSmartReebGraph(), REEB_exportGraph(), and verifyFaces().
| void BLI_ghashIterator_free | ( | GHashIterator * | ghi | ) |
Free a GHashIterator.
| ghi | The iterator to free. |
Definition at line 130 of file BLI_ghash.c.
References MEM_freeN().
Referenced by applyModifier(), BLI_pbvh_get_grid_updates(), build_mesh_leaf_node(), dupli_keyIndexHash(), free_sss(), operator_search_cb(), pyop_dir(), sb_detect_aabb_collisionCached(), sb_detect_edge_collisionCached(), sb_detect_face_collisionCached(), sb_detect_face_pointCached(), sb_detect_vertex_collisionCached(), WM_menutype_contains(), and WM_menutype_free().
| void* BLI_ghashIterator_getKey | ( | GHashIterator * | ghi | ) |
Retrieve the key from an iterator.
| ghi | The iterator. |
Definition at line 134 of file BLI_ghash.c.
References GHashIterator::curEntry, Entry::key, and NULL.
Referenced by applyModifier(), BIF_currentTemplate(), BIF_listTemplates(), BLI_pbvh_get_grid_updates(), build_mesh_leaf_node(), dupli_keyIndexHash(), sb_detect_aabb_collisionCached(), sb_detect_edge_collisionCached(), sb_detect_face_collisionCached(), sb_detect_face_pointCached(), and sb_detect_vertex_collisionCached().
| void* BLI_ghashIterator_getValue | ( | GHashIterator * | ghi | ) |
Retrieve the value from an iterator.
| ghi | The iterator. |
Definition at line 137 of file BLI_ghash.c.
References GHashIterator::curEntry, NULL, and Entry::val.
Referenced by applyModifier(), BIF_currentTemplate(), BIF_listTemplates(), build_mesh_leaf_node(), dupli_keyIndexHash(), filterSmartReebGraph(), free_sss(), mergeArcFaces(), operator_search_cb(), pyop_dir(), RIG_reconnectControlBones(), sb_detect_aabb_collisionCached(), sb_detect_edge_collisionCached(), sb_detect_face_collisionCached(), sb_detect_face_pointCached(), sb_detect_vertex_collisionCached(), WM_menutype_contains(), and WM_menutype_free().
| void BLI_ghashIterator_init | ( | GHashIterator * | ghi, |
| GHash * | gh | ||
| ) |
Init an already allocated GHashIterator. The hash table must not be mutated while the iterator is in use, and the iterator will step exactly BLI_ghash_size(gh) times before becoming done.
| ghi | The GHashIterator to initialize. |
| gh | The GHash to iterate over. |
Definition at line 119 of file BLI_ghash.c.
References GHash::buckets, GHashIterator::curBucket, GHashIterator::curEntry, GHashIterator::gh, GHash::nbuckets, and NULL.
Referenced by BIF_currentTemplate(), BIF_listTemplates(), filterSmartReebGraph(), mergeArcFaces(), and RIG_reconnectControlBones().
| int BLI_ghashIterator_isDone | ( | GHashIterator * | ghi | ) |
Determine if an iterator is done (has reached the end of the hash table).
| ghi | The iterator. |
Definition at line 152 of file BLI_ghash.c.
References GHashIterator::curEntry.
Referenced by applyModifier(), BIF_currentTemplate(), BIF_listTemplates(), BLI_pbvh_get_grid_updates(), build_mesh_leaf_node(), dupli_keyIndexHash(), filterSmartReebGraph(), free_sss(), mergeArcFaces(), operator_search_cb(), pyop_dir(), RIG_reconnectControlBones(), sb_detect_aabb_collisionCached(), sb_detect_edge_collisionCached(), sb_detect_face_collisionCached(), sb_detect_face_pointCached(), sb_detect_vertex_collisionCached(), WM_menutype_contains(), and WM_menutype_free().
| GHashIterator* BLI_ghashIterator_new | ( | GHash * | gh | ) |
Create a new GHashIterator. The hash table must not be mutated while the iterator is in use, and the iterator will step exactly BLI_ghash_size(gh) times before becoming done.
| gh | The GHash to iterate over. |
Definition at line 106 of file BLI_ghash.c.
References GHash::buckets, GHashIterator::curBucket, GHashIterator::curEntry, GHashIterator::gh, MEM_mallocN(), GHash::nbuckets, and NULL.
Referenced by applyModifier(), BLI_pbvh_get_grid_updates(), build_mesh_leaf_node(), dupli_keyIndexHash(), free_sss(), sb_detect_aabb_collisionCached(), sb_detect_edge_collisionCached(), sb_detect_face_collisionCached(), sb_detect_face_pointCached(), sb_detect_vertex_collisionCached(), WM_menutype_contains(), WM_menutype_free(), and WM_operatortype_iter().
| void BLI_ghashIterator_step | ( | GHashIterator * | ghi | ) |
Steps the iterator to the next index.
| ghi | The iterator. |
Definition at line 141 of file BLI_ghash.c.
References GHash::buckets, GHashIterator::curBucket, GHashIterator::curEntry, GHashIterator::gh, GHash::nbuckets, and Entry::next.
Referenced by applyModifier(), BIF_currentTemplate(), BIF_listTemplates(), BLI_pbvh_get_grid_updates(), build_mesh_leaf_node(), dupli_keyIndexHash(), filterSmartReebGraph(), free_sss(), mergeArcFaces(), operator_search_cb(), pyop_dir(), RIG_reconnectControlBones(), sb_detect_aabb_collisionCached(), sb_detect_edge_collisionCached(), sb_detect_face_collisionCached(), sb_detect_face_pointCached(), sb_detect_vertex_collisionCached(), WM_menutype_contains(), and WM_menutype_free().
| int BLI_ghashutil_intcmp | ( | const void * | a, |
| const void * | b | ||
| ) |
Definition at line 181 of file BLI_ghash.c.
Referenced by applyModifier(), BIF_makeListTemplates(), BKE_icons_init(), build_mesh_leaf_node(), and keycmp().
| unsigned int BLI_ghashutil_inthash | ( | const void * | ptr | ) |
Definition at line 168 of file BLI_ghash.c.
Referenced by applyModifier(), BIF_makeListTemplates(), BKE_icons_init(), and build_mesh_leaf_node().
| int BLI_ghashutil_ptrcmp | ( | const void * | a, |
| const void * | b | ||
| ) |
Definition at line 161 of file BLI_ghash.c.
Referenced by animdata_filter_remove_duplis(), BLI_pbvh_get_grid_updates(), BLO_blendhandle_get_linkable_groups(), BME_init_transdata(), cloneRigGraph(), codegen_set_unique_ids(), ConvertCSGDescriptorsToDerivedMesh(), copyArc(), createArc(), createSlideVerts(), dag_add_node(), dupli_keyIndexHash(), esubdivideflag(), game_copy_pose(), get_object_orco(), init_editNurb_keyIndex(), knife_cut_exec(), make_sss_tree(), sb_new_scratch(), set_object_orco(), and strand_shade_cache_create().
| unsigned int BLI_ghashutil_ptrhash | ( | const void * | key | ) |
Definition at line 158 of file BLI_ghash.c.
Referenced by animdata_filter_remove_duplis(), BLI_pbvh_get_grid_updates(), BLO_blendhandle_get_linkable_groups(), BME_init_transdata(), cloneRigGraph(), codegen_set_unique_ids(), ConvertCSGDescriptorsToDerivedMesh(), copyArc(), createArc(), createSlideVerts(), dag_add_node(), dupli_keyIndexHash(), esubdivideflag(), game_copy_pose(), get_object_orco(), init_editNurb_keyIndex(), knife_cut_exec(), make_sss_tree(), sb_new_scratch(), set_object_orco(), and strand_shade_cache_create().
| int BLI_ghashutil_strcmp | ( | const void * | a, |
| const void * | b | ||
| ) |
Definition at line 198 of file BLI_ghash.c.
Referenced by applyModifier(), BKE_nlastrip_validate_name(), GPU_lookup_function(), make_pose_channels_hash(), newRigGraph(), RNA_init(), WM_menutype_init(), wm_operatortype_init(), and wpaint_make_validmap().
| unsigned int BLI_ghashutil_strhash | ( | const void * | ptr | ) |
Definition at line 188 of file BLI_ghash.c.
References i.
Referenced by applyModifier(), BKE_nlastrip_validate_name(), GPU_lookup_function(), make_pose_channels_hash(), newRigGraph(), RNA_init(), ui_popup_menu_hash(), ui_popup_string_hash(), WM_menutype_init(), wm_operatortype_init(), and wpaint_make_validmap().
| unsigned int hashsizes[] |
{
5, 11, 17, 37, 67, 131, 257, 521, 1031, 2053, 4099, 8209,
16411, 32771, 65537, 131101, 262147, 524309, 1048583, 2097169,
4194319, 8388617, 16777259, 33554467, 67108879, 134217757,
268435459
}
Definition at line 43 of file BLI_ghash.c.
Referenced by BLI_edgehash_insert(), BLI_edgehash_new(), and BLI_ghash_new().