Blender  V2.93
BKE_outliner_treehash.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 #pragma once
17 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 struct BLI_mempool;
27 struct ID;
28 struct TreeStoreElem;
29 
30 /* create and fill hashtable with treestore elements */
32 
33 /* full rebuild for already allocated hashtable */
34 void *BKE_outliner_treehash_rebuild_from_treestore(void *treehash, struct BLI_mempool *treestore);
35 
36 /* clear element usage flags */
37 void BKE_outliner_treehash_clear_used(void *treehash);
38 
39 /* Add/remove hashtable elements */
40 void BKE_outliner_treehash_add_element(void *treehash, struct TreeStoreElem *elem);
41 void BKE_outliner_treehash_remove_element(void *treehash, struct TreeStoreElem *elem);
42 
43 /* find first unused element with specific type, nr and id */
45  short type,
46  short nr,
47  struct ID *id);
48 
49 /* find user or unused element with specific type, nr and id */
50 struct TreeStoreElem *BKE_outliner_treehash_lookup_any(void *treehash,
51  short type,
52  short nr,
53  struct ID *id);
54 
55 /* free treehash structure */
56 void BKE_outliner_treehash_free(void *treehash);
57 
58 #ifdef __cplusplus
59 }
60 #endif
void BKE_outliner_treehash_clear_used(void *treehash)
struct TreeStoreElem * BKE_outliner_treehash_lookup_unused(void *treehash, short type, short nr, struct ID *id)
struct TreeStoreElem * BKE_outliner_treehash_lookup_any(void *treehash, short type, short nr, struct ID *id)
void * BKE_outliner_treehash_create_from_treestore(struct BLI_mempool *treestore)
void * BKE_outliner_treehash_rebuild_from_treestore(void *treehash, struct BLI_mempool *treestore)
void BKE_outliner_treehash_free(void *treehash)
void BKE_outliner_treehash_add_element(void *treehash, struct TreeStoreElem *elem)
void BKE_outliner_treehash_remove_element(void *treehash, struct TreeStoreElem *elem)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Definition: DNA_ID.h:273