src/ucx/cx/tree.h

changeset 645
0c85c4cd0dd8
parent 621
956c03c25edd
equal deleted inserted replaced
644:e96e92e3508f 645:0c85c4cd0dd8
86 * Offset in the node struct for the next pointer. 86 * Offset in the node struct for the next pointer.
87 */ 87 */
88 ptrdiff_t loc_next; 88 ptrdiff_t loc_next;
89 /** 89 /**
90 * The total number of distinct nodes that have been passed so far. 90 * The total number of distinct nodes that have been passed so far.
91 * This includes the current node.
91 */ 92 */
92 size_t counter; 93 size_t counter;
93 /** 94 /**
94 * The currently observed node. 95 * The currently observed node.
95 * 96 *
183 * Offset in the node struct for the next pointer. 184 * Offset in the node struct for the next pointer.
184 */ 185 */
185 ptrdiff_t loc_next; 186 ptrdiff_t loc_next;
186 /** 187 /**
187 * The total number of distinct nodes that have been passed so far. 188 * The total number of distinct nodes that have been passed so far.
189 * This includes the currently visited node.
188 */ 190 */
189 size_t counter; 191 size_t counter;
190 /** 192 /**
191 * The currently observed node. 193 * The currently observed node.
192 * 194 *
1092 * @param tree the tree to iterate 1094 * @param tree the tree to iterate
1093 * @return a tree visitor (a.k.a. breadth-first iterator) 1095 * @return a tree visitor (a.k.a. breadth-first iterator)
1094 * @see cxTreeIterate() 1096 * @see cxTreeIterate()
1095 */ 1097 */
1096 cx_attr_nonnull cx_attr_nodiscard 1098 cx_attr_nonnull cx_attr_nodiscard
1097 CxTreeVisitor cxTreeVisit(CxTree *tree); 1099 CX_EXPORT CxTreeVisitor cxTreeVisit(CxTree *tree);
1098 1100
1099 /** 1101 /**
1100 * Sets the (new) parent of the specified child. 1102 * Sets the (new) parent of the specified child.
1101 * 1103 *
1102 * If the @p child is not already a member of the tree, this function behaves 1104 * If the @p child is not already a member of the tree, this function behaves

mercurial