cdcontainers  0.1.1
Library of data containers and collections for C programming language.
Functions
Cdc_hash_table_iter

The cdc_hash_table_iter is a struct and functions that provide a hash table iterator. More...

Functions

static void cdc_hash_table_iter_next (struct cdc_hash_table_iter *it)
 Advances the iterator to the next element in the hash table. More...
 
static bool cdc_hash_table_iter_has_next (struct cdc_hash_table_iter *it)
 Returns true if there is at least one element ahead of the iterator, i.e. the iterator is not at the back of the container; otherwise returns false. More...
 
static void * cdc_hash_table_iter_key (struct cdc_hash_table_iter *it)
 Returns an item's key. More...
 
static void * cdc_hash_table_iter_value (struct cdc_hash_table_iter *it)
 Returns an item's value. More...
 
static struct cdc_pair cdc_hash_table_iter_key_value (struct cdc_hash_table_iter *it)
 Returns a pair, where first - key, second - value. More...
 
static bool cdc_hash_table_iter_is_eq (struct cdc_hash_table_iter *it1, struct cdc_hash_table_iter *it2)
 Returns false if the iterator |it1| equal to the iterator |it2|, otherwise returns false. More...
 

Detailed Description

The cdc_hash_table_iter is a struct and functions that provide a hash table iterator.

Function Documentation

◆ cdc_hash_table_iter_next()

static void cdc_hash_table_iter_next ( struct cdc_hash_table_iter it)
inlinestatic

Advances the iterator to the next element in the hash table.

Parameters
[in]it- iterator

◆ cdc_hash_table_iter_has_next()

static bool cdc_hash_table_iter_has_next ( struct cdc_hash_table_iter it)
inlinestatic

Returns true if there is at least one element ahead of the iterator, i.e. the iterator is not at the back of the container; otherwise returns false.

Parameters
[in]it- iterator
Returns
true if there is at least one element ahead of the iterator, i.e. the iterator is not at the back of the container; otherwise returns false.

◆ cdc_hash_table_iter_key()

static void* cdc_hash_table_iter_key ( struct cdc_hash_table_iter it)
inlinestatic

Returns an item's key.

Parameters
[in]it- iterator
Returns
the item's key.

◆ cdc_hash_table_iter_value()

static void* cdc_hash_table_iter_value ( struct cdc_hash_table_iter it)
inlinestatic

Returns an item's value.

Parameters
[in]it- iterator
Returns
the item's value.

◆ cdc_hash_table_iter_key_value()

static struct cdc_pair cdc_hash_table_iter_key_value ( struct cdc_hash_table_iter it)
static

Returns a pair, where first - key, second - value.

Parameters
[in]it- iterator
Returns
pair, where first - key, second - value.

◆ cdc_hash_table_iter_is_eq()

static bool cdc_hash_table_iter_is_eq ( struct cdc_hash_table_iter it1,
struct cdc_hash_table_iter it2 
)
inlinestatic

Returns false if the iterator |it1| equal to the iterator |it2|, otherwise returns false.

Parameters
[in]it1- iterator
[in]it2- iterator
Returns
false if the iterator |it1| equal to the iterator |it2|, otherwise returns false.