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

Base attributes of a collection. More...

#include <collection.h>

Data Fields

const CxAllocatorallocator
 The allocator to use.
 
cx_compare_func cmpfunc
 The comparator function for the elements.
 
size_t elem_size
 The size of each element.
 
size_t size
 The number of currently stored elements.
 
cx_destructor_func simple_destructor
 An optional simple destructor for the collection's elements.
 
cx_destructor_func2 advanced_destructor
 An optional advanced destructor for the collection's elements.
 
void * destructor_data
 The pointer to additional data that is passed to the advanced destructor.
 
bool store_pointer
 Indicates if this list is supposed to store pointers instead of copies of the actual objects.
 
bool sorted
 Indicates if this collection is guaranteed to be sorted.
 

Detailed Description

Base attributes of a collection.

Field Documentation

◆ advanced_destructor

cx_destructor_func2 cx_collection_s::advanced_destructor

An optional advanced destructor for the collection's elements.

Attention
Read the documentation of the particular collection implementation whether this destructor shall only destroy the contents or also free the memory.

◆ simple_destructor

cx_destructor_func cx_collection_s::simple_destructor

An optional simple destructor for the collection's elements.

Attention
Read the documentation of the particular collection implementation whether this destructor shall only destroy the contents or also free the memory.

◆ sorted

bool cx_collection_s::sorted

Indicates if this collection is guaranteed to be sorted.

Note that the elements can still be sorted, even when the collection is not aware of that.


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