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

The cdc_list_iter is a struct and functions that provide a list iterator. More...

Functions

static void cdc_list_iter_next (struct cdc_list_iter *it)
 Advances the iterator to the next element in the list. More...
 
static void cdc_list_iter_prev (struct cdc_list_iter *it)
 Advances the iterator to the previous element in the list. More...
 
static bool cdc_list_iter_has_next (struct cdc_list_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 bool cdc_list_iter_has_prev (struct cdc_list_iter *it)
 Returns true if there is at least one element behind the iterator, i.e. the iterator is not at the front of the container; otherwise returns false. More...
 
static void * cdc_list_iter_data (struct cdc_list_iter *it)
 Returns a current element. More...
 
static void cdc_list_iter_from (struct cdc_list_riter *rit, struct cdc_list_iter *it)
 Сasts reverse iterator to iterator. More...
 
static bool cdc_list_iter_is_eq (struct cdc_list_iter *it1, struct cdc_list_iter *it2)
 Returns false if the iterator |it1| equal to the iterator |it2|, otherwise returns false. More...
 
static void cdc_list_riter_next (struct cdc_list_riter *it)
 Advances the reverse iterator to the next element in the list. More...
 
static void cdc_list_riter_prev (struct cdc_list_riter *it)
 Advances the reverse iterator to the previous element in the list. More...
 
static bool cdc_list_riter_has_next (struct cdc_list_riter *it)
 Returns true if there is at least one item ahead of the reverse iterator, i.e. the reverse iterator is not at the back of the container. otherwise returns false. More...
 
static bool cdc_list_riter_has_prev (struct cdc_list_riter *it)
 Returns true if there is at least one item behind the reverse iterator, i.e. the reverse iterator is not at the front of the container; otherwise returns false. More...
 
static void * cdc_list_riter_data (struct cdc_list_riter *it)
 Returns a current element. More...
 
static void cdc_list_riter_from (struct cdc_list_iter *it, struct cdc_list_riter *rit)
 Сasts iterator to reverse iterator. More...
 
static bool cdc_list_riter_is_eq (struct cdc_list_riter *rit1, struct cdc_list_riter *rit2)
 Returns false if the reverse iterator |rit1| equal to the reverse iterator |rit2|, otherwise returns false. More...
 

Detailed Description

The cdc_list_iter is a struct and functions that provide a list iterator.

Function Documentation

◆ cdc_list_iter_next()

static void cdc_list_iter_next ( struct cdc_list_iter it)
inlinestatic

Advances the iterator to the next element in the list.

Parameters
[in]it- iterator

◆ cdc_list_iter_prev()

static void cdc_list_iter_prev ( struct cdc_list_iter it)
inlinestatic

Advances the iterator to the previous element in the list.

Parameters
[in]it- iterator

◆ cdc_list_iter_has_next()

static bool cdc_list_iter_has_next ( struct cdc_list_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_list_iter_has_prev()

static bool cdc_list_iter_has_prev ( struct cdc_list_iter it)
inlinestatic

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

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

◆ cdc_list_iter_data()

static void* cdc_list_iter_data ( struct cdc_list_iter it)
inlinestatic

Returns a current element.

Parameters
[in]it- iterator

◆ cdc_list_iter_from()

static void cdc_list_iter_from ( struct cdc_list_riter rit,
struct cdc_list_iter it 
)
inlinestatic

Сasts reverse iterator to iterator.

Parameters
[in]rit- reverse iterator
[out]it- iterator

◆ cdc_list_iter_is_eq()

static bool cdc_list_iter_is_eq ( struct cdc_list_iter it1,
struct cdc_list_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.

◆ cdc_list_riter_next()

static void cdc_list_riter_next ( struct cdc_list_riter it)
inlinestatic

Advances the reverse iterator to the next element in the list.

Parameters
[in]it- reverse iterator

◆ cdc_list_riter_prev()

static void cdc_list_riter_prev ( struct cdc_list_riter it)
inlinestatic

Advances the reverse iterator to the previous element in the list.

Parameters
[in]it- reverse iterator

◆ cdc_list_riter_has_next()

static bool cdc_list_riter_has_next ( struct cdc_list_riter it)
inlinestatic

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

Parameters
[in]it- reverse iterator
Returns
true if there is at least one item ahead of the reverse iterator, i.e. the reverse iterator is not at the back of the container.

◆ cdc_list_riter_has_prev()

static bool cdc_list_riter_has_prev ( struct cdc_list_riter it)
inlinestatic

Returns true if there is at least one item behind the reverse iterator, i.e. the reverse iterator is not at the front of the container; otherwise returns false.

Parameters
[in]it- reverse iterator
Returns
true if there is at least one item behind the reverse iterator, i.e. the reverse iterator is not at the front of the container; otherwise returns false.

◆ cdc_list_riter_data()

static void* cdc_list_riter_data ( struct cdc_list_riter it)
inlinestatic

Returns a current element.

Parameters
[in]it- reverse iterator

◆ cdc_list_riter_from()

static void cdc_list_riter_from ( struct cdc_list_iter it,
struct cdc_list_riter rit 
)
inlinestatic

Сasts iterator to reverse iterator.

Parameters
[in]it- iterator
[out]rit- reverse iterator

◆ cdc_list_riter_is_eq()

static bool cdc_list_riter_is_eq ( struct cdc_list_riter rit1,
struct cdc_list_riter rit2 
)
inlinestatic

Returns false if the reverse iterator |rit1| equal to the reverse iterator |rit2|, otherwise returns false.

Parameters
[in]rit1- reverse iterator
[in]rit2- reverse iterator