ucx
UAP Common Extensions
Loading...
Searching...
No Matches
Data Fields
cx_map_iterator_s Struct Reference

Internal iterator struct - use CxMapIterator. More...

#include <map.h>

Data Fields

struct cx_iterator_base_s base
 Inherited common data for all iterators.
 
union { 
 
   CxMap *   m 
 Access for mutating iterators.
 
   const CxMap *   c 
 Access for normal iterators.
 
map 
 Handle for the source map.
 
void * elem
 Handle for the current element.
 
CxMapEntry entry
 Reserved memory for a map entry.
 
size_t slot
 Field for storing the current slot number.
 
size_t index
 Counts the elements successfully.
 
size_t elem_size
 The size of a value stored in this map.
 
size_t elem_count
 May contain the total number of elements, if known.
 
enum cx_map_iterator_type type
 The type of this iterator.
 

Detailed Description

Internal iterator struct - use CxMapIterator.

Field Documentation

◆ elem

void* cx_map_iterator_s::elem

Handle for the current element.

Attention
Depends on the map implementation, do not assume a type (better: do not use!).

◆ elem_count

size_t cx_map_iterator_s::elem_count

May contain the total number of elements, if known.

Set to SIZE_MAX when the total number is unknown during iteration.

Remarks
The UCX implementations of CxMap always know the number of elements they store.

◆ entry

CxMapEntry cx_map_iterator_s::entry

Reserved memory for a map entry.

If a map implementation uses an incompatible layout, the iterator needs something to point to during iteration which is compatible.

◆ index

size_t cx_map_iterator_s::index

Counts the elements successfully.

It usually does not denote a stable index within the map as it would be for arrays.

◆ slot

size_t cx_map_iterator_s::slot

Field for storing the current slot number.

(Used internally)


The documentation for this struct was generated from the following file: