2.4.4.3 Iteration — Zix 0.8.2 documentation

# 2.4.4.3 Iteration

typedef struct ZixTreeNodeImpl ZixTreeIter

  An iterator over a `ZixTree`.

ZixTreeIter *zix_tree_begin(ZixTree *t)

  Return an iterator to the first (smallest) element in `t`.

ZixTreeIter *zix_tree_end(ZixTree *t)

  Return an iterator the the element one past the last element in `t`.

void *zix_tree_get(const ZixTreeIter *ti)

  Return the data associated with the given tree item.

bool zix_tree_iter_is_end(const ZixTreeIter *i)

  Return true iff `i` is an iterator to the end of its tree.

bool zix_tree_iter_is_rend(const ZixTreeIter *i)

  Return true iff `i` is an iterator to the reverse end of its tree.

ZixTreeIter *zix_tree_iter_next(ZixTreeIter *i)

  Return an iterator that points to the element one past `i`.

ZixTreeIter *zix_tree_iter_prev(ZixTreeIter *i)

  Return an iterator that points to the element one before `i`.

ZixTreeIter *zix_tree_rbegin(ZixTree *t)

  Return an iterator to the last (largest) element in `t`.

ZixTreeIter *zix_tree_rend(ZixTree *t)

  Return an iterator the the element one before the first element in `t`.