src/cx/tree.h

branch
feature/tree_add
changeset 860
558ed4c6abd0
parent 859
6367456bf2d9
child 863
4a220afebad0
equal deleted inserted replaced
859:6367456bf2d9 860:558ed4c6abd0
402 void *root, 402 void *root,
403 ptrdiff_t loc_children, 403 ptrdiff_t loc_children,
404 ptrdiff_t loc_next 404 ptrdiff_t loc_next
405 ); 405 );
406 406
407 /**
408 * Describes a function that creates a tree node from the specified data.
409 */
410 typedef void (*cx_tree_node_create_fun)(void const*);
411
412 __attribute__((__nonnull__))
413 size_t cx_tree_add_iter(
414 struct cx_iterator_base_s *iter,
415 cx_tree_search_func sfunc,
416 cx_tree_node_create_fun cfunc,
417 void **root,
418 ptrdiff_t loc_parent,
419 ptrdiff_t loc_children,
420 ptrdiff_t loc_prev,
421 ptrdiff_t loc_next
422 );
423
424 __attribute__((__nonnull__))
425 size_t cx_tree_add_array(
426 void const *src,
427 size_t num,
428 size_t elem_size,
429 cx_tree_search_func sfunc,
430 cx_tree_node_create_fun cfunc,
431 void **root,
432 ptrdiff_t loc_parent,
433 ptrdiff_t loc_children,
434 ptrdiff_t loc_prev,
435 ptrdiff_t loc_next
436 );
437
438 __attribute__((__nonnull__))
439 void *cx_tree_add(
440 void const *src,
441 cx_tree_search_func sfunc,
442 cx_tree_node_create_fun cfunc,
443 void **root,
444 ptrdiff_t loc_parent,
445 ptrdiff_t loc_children,
446 ptrdiff_t loc_prev,
447 ptrdiff_t loc_next
448 );
449
407 #ifdef __cplusplus 450 #ifdef __cplusplus
408 } // extern "C" 451 } // extern "C"
409 #endif 452 #endif
410 453
411 #endif //UCX_TREE_H 454 #endif //UCX_TREE_H

mercurial