OLD | NEW |
1 /* | 1 /* |
2 * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at> | 2 * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at> |
3 * | 3 * |
4 * This file is part of FFmpeg. | 4 * This file is part of FFmpeg. |
5 * | 5 * |
6 * FFmpeg is free software; you can redistribute it and/or | 6 * FFmpeg is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Lesser General Public | 7 * modify it under the terms of the GNU Lesser General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2.1 of the License, or (at your option) any later version. | 9 * version 2.1 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 * } | 72 * } |
73 * @endcode | 73 * @endcode |
74 * @return If no insertion happened, the found element; if an insertion or | 74 * @return If no insertion happened, the found element; if an insertion or |
75 * removal happened, then either key or NULL will be returned. | 75 * removal happened, then either key or NULL will be returned. |
76 * Which one it is depends on the tree state and the implementation. You | 76 * Which one it is depends on the tree state and the implementation. You |
77 * should make no assumptions that it's one or the other in the code. | 77 * should make no assumptions that it's one or the other in the code. |
78 */ | 78 */ |
79 void *av_tree_insert(struct AVTreeNode **rootp, void *key, int (*cmp)(void *key,
const void *b), struct AVTreeNode **next); | 79 void *av_tree_insert(struct AVTreeNode **rootp, void *key, int (*cmp)(void *key,
const void *b), struct AVTreeNode **next); |
80 void av_tree_destroy(struct AVTreeNode *t); | 80 void av_tree_destroy(struct AVTreeNode *t); |
81 | 81 |
| 82 /** |
| 83 * Applies enu(opaque, &elem) to all the elements in the tree in a given range. |
| 84 * |
| 85 * @param cmp a comparison function that returns < 0 for a element below the |
| 86 * range, > 0 for a element above the range and == 0 for a |
| 87 * element inside the range |
| 88 * |
| 89 * @note The cmp function should use the same ordering used to construct the |
| 90 * tree. |
| 91 */ |
| 92 void av_tree_enumerate(struct AVTreeNode *t, void *opaque, int (*cmp)(void *opaq
ue, void *elem), int (*enu)(void *opaque, void *elem)); |
| 93 |
| 94 |
82 #endif /* AVUTIL_TREE_H */ | 95 #endif /* AVUTIL_TREE_H */ |
OLD | NEW |