1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Inlined Routines Associated with Red-Black Trees |
---|
5 | * |
---|
6 | * This include file contains the bodies of the routines which are |
---|
7 | * associated with Red-Black Trees and inlined. |
---|
8 | * |
---|
9 | * @note The routines in this file are ordered from simple |
---|
10 | * to complex. No other RBTree Handler routine is referenced |
---|
11 | * unless it has already been defined. |
---|
12 | */ |
---|
13 | |
---|
14 | /* |
---|
15 | * Copyright (c) 2010-2012 Gedare Bloom. |
---|
16 | * |
---|
17 | * The license and distribution terms for this file may be |
---|
18 | * found in the file LICENSE in this distribution or at |
---|
19 | * http://www.rtems.org/license/LICENSE. |
---|
20 | */ |
---|
21 | |
---|
22 | #ifndef _RTEMS_SCORE_RBTREEIMPL_H |
---|
23 | #define _RTEMS_SCORE_RBTREEIMPL_H |
---|
24 | |
---|
25 | #include <rtems/score/rbtree.h> |
---|
26 | |
---|
27 | #ifdef __cplusplus |
---|
28 | extern "C" { |
---|
29 | #endif |
---|
30 | |
---|
31 | /** |
---|
32 | * @addtogroup ScoreRBTree |
---|
33 | */ |
---|
34 | /**@{**/ |
---|
35 | |
---|
36 | /** |
---|
37 | * @brief Red-black tree visitor. |
---|
38 | * |
---|
39 | * @param[in] node The node. |
---|
40 | * @param[in] visitor_arg The visitor argument. |
---|
41 | * |
---|
42 | * @retval true Stop the iteration. |
---|
43 | * @retval false Continue the iteration. |
---|
44 | * |
---|
45 | * @see _RBTree_Iterate(). |
---|
46 | */ |
---|
47 | typedef bool (*RBTree_Visitor)( |
---|
48 | const RBTree_Node *node, |
---|
49 | void *visitor_arg |
---|
50 | ); |
---|
51 | |
---|
52 | /** |
---|
53 | * @brief Red-black tree iteration. |
---|
54 | * |
---|
55 | * @param[in] rbtree The red-black tree. |
---|
56 | * @param[in] visitor The visitor. |
---|
57 | * @param[in] visitor_arg The visitor argument. |
---|
58 | */ |
---|
59 | void _RBTree_Iterate( |
---|
60 | const RBTree_Control *rbtree, |
---|
61 | RBTree_Visitor visitor, |
---|
62 | void *visitor_arg |
---|
63 | ); |
---|
64 | |
---|
65 | /** @} */ |
---|
66 | |
---|
67 | #ifdef __cplusplus |
---|
68 | } |
---|
69 | #endif |
---|
70 | |
---|
71 | #endif |
---|
72 | /* end of include file */ |
---|