function lfds710_hash_a_iterate

From liblfds.org
Jump to navigation Jump to search

Source Files

└───liblfds710
    ├───inc
    │   └───liblfds710
    │           lfds710_hash_addonly.h
    └───src
        └───llfds710_hash_addonly
                lfds710_hash_addonly_iterate.c

Opaque Structures

struct lfds710_hash_a_element;
struct lfds710_hash_a_iterate;

Prototype

int lfds710_hash_a_iterate( struct lfds710_hash_a_iterate *hai, struct lfds710_hash_a_element **hae );

Parameters

struct lfds710_hash_a_iterate *hai

A pointer to an initialized struct lfds710_hash_a_iterate.

struct lfds710_hash_a_element **hae

Set to point to the next element in the iteration.

Return Value

Returns 1 on a successful iteration. Returns 0 when iteration is complete.

Notes

This function iterates over the hash elements. The underlying data structure is an array of btrees, and the function iterates over each btree, performing a smallest-to-largest walk on each btree. As such the iteration is overall unordered, but proceeds in ordered blocks. Any elements which are added to the hash during iteration may or may not be seen - it depends on whether or not they turn up 'in front' of the current position of the iterator.

See Also