~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to source/blender/blenlib/BLI_dlrbTree.h

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2012-07-23 08:54:18 UTC
  • mfrom: (14.2.16 sid)
  • mto: (14.2.19 sid)
  • mto: This revision was merged to the branch mainline in revision 42.
  • Revision ID: package-import@ubuntu.com-20120723085418-9foz30v6afaf5ffs
Tags: 2.63a-2
* debian/: Cycles support added (Closes: #658075)
  For now, this top feature has been enabled only
  on [any-amd64 any-i386] architectures because
  of OpenImageIO failing on all others
* debian/: scripts installation path changed
  from /usr/lib to /usr/share:
  + debian/patches/: patchset re-worked for path changing
  + debian/control: "Breaks" field added on yafaray-exporter

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**
2
 
 * $Id: BLI_dlrbTree.h 26841 2010-02-12 13:34:04Z campbellbarton $
3
 
 *
 
1
/*
4
2
 * ***** BEGIN GPL LICENSE BLOCK *****
5
3
 *
6
4
 * This program is free software; you can redistribute it and/or
25
23
 * ***** END GPL LICENSE BLOCK *****
26
24
 */
27
25
 
28
 
#ifndef BLI_DLRB_TREE_H
29
 
#define BLI_DLRB_TREE_H
 
26
#ifndef __BLI_DLRBTREE_H__
 
27
#define __BLI_DLRBTREE_H__
 
28
 
 
29
/** \file BLI_dlrbTree.h
 
30
 *  \ingroup bli
 
31
 *  \author Joshua Leung
 
32
 */
30
33
 
31
34
/* Double-Linked Red-Black Tree Implementation:
32
35
 * 
74
77
 
75
78
/* return -1, 0, 1 for whether the given data is less than, equal to, or greater than the given node 
76
79
 *      - node: <DLRBT_Node> the node to compare to
77
 
 *      - data: pointer to the relevant data or values stored in the bitpattern dependant on the function
 
80
 *      - data: pointer to the relevant data or values stored in the bitpattern dependent on the function
78
81
 */
79
82
typedef short (*DLRBT_Comparator_FP)(void *node, void *data);
80
83
 
85
88
 
86
89
/* update an existing node instance accordingly to be in sync with the given data *     
87
90
 *      - node: <DLRBT_Node> the node to update
88
 
 *      - data: pointer to the relevant data or values stored in the bitpattern dependant on the function
 
91
 *      - data: pointer to the relevant data or values stored in the bitpattern dependent on the function
89
92
 */
90
93
typedef void (*DLRBT_NUpdate_FP)(void *node, void *data);
91
94
 
94
97
 
95
98
/* ADT Management ------------------------------- */
96
99
 
97
 
/* Create a new tree, and initialise as necessary */
 
100
/* Create a new tree, and initialize as necessary */
98
101
DLRBT_Tree *BLI_dlrbTree_new(void);
99
102
 
100
 
/* Initialises some given trees */
 
103
/* Initializes some given trees */
101
104
void BLI_dlrbTree_init(DLRBT_Tree *tree);
102
105
 
103
106
/* Free some tree */
139
142
 
140
143
/* Remove the given element from the tree and balance again */
141
144
// FIXME: this is not implemented yet... 
142
 
void BLI_dlrbTree_remove(DLRBT_Tree *tree, DLRBT_Node *node);
 
145
// void BLI_dlrbTree_remove(DLRBT_Tree *tree, DLRBT_Node *node);
143
146
 
144
147
/* Node Operations (Manual) --------------------- */
145
148
/* These methods require custom code for creating BST nodes and adding them to the 
155
158
 
156
159
/* ********************************************** */
157
160
 
158
 
#endif // BLI_DLRB_TREE_H
 
161
#endif // __BLI_DLRBTREE_H__