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

The class definition for arbitrary lists. More...

#include <list.h>

Data Fields

void(* destructor )(struct cx_list_s *list)
 Destructor function.
 
int(* insert_element )(struct cx_list_s *list, size_t index, void const *data)
 Member function for inserting a single element.
 
size_t(* insert_array )(struct cx_list_s *list, size_t index, void const *data, size_t n)
 Member function for inserting multiple elements.
 
int(* insert_iter )(struct cx_mut_iterator_s *iter, void const *elem, int prepend)
 Member function for inserting an element relative to an iterator position.
 
int(* remove )(struct cx_list_s *list, size_t index)
 Member function for removing an element.
 
void(* clear )(struct cx_list_s *list)
 Member function for removing all elements.
 
int(* swap )(struct cx_list_s *list, size_t i, size_t j)
 Member function for swapping two elements.
 
void *(* at )(struct cx_list_s const *list, size_t index)
 Member function for element lookup.
 
ssize_t(* find )(struct cx_list_s const *list, void const *elem)
 Member function for finding an element.
 
void(* sort )(struct cx_list_s *list)
 Member function for sorting the list in-place.
 
int(* compare )(struct cx_list_s const *list, struct cx_list_s const *other)
 Member function for comparing this list to another list of the same type.
 
void(* reverse )(struct cx_list_s *list)
 Member function for reversing the order of the items.
 
struct cx_iterator_s(* iterator )(struct cx_list_s const *list, size_t index, bool backward)
 Member function for returning an iterator pointing to the specified index.
 

Detailed Description

The class definition for arbitrary lists.

Field Documentation

◆ destructor

void(* cx_list_class_s::destructor) (struct cx_list_s *list)

Destructor function.

Implementations SHALL invoke the content destructor functions if provided and SHALL deallocate the list memory, if an allocator is provided.

◆ insert_array

size_t(* cx_list_class_s::insert_array) (struct cx_list_s *list, size_t index, void const *data, size_t n)

Member function for inserting multiple elements.

Implementors SHOULD see to performant implementations for corner cases.

◆ insert_element

int(* cx_list_class_s::insert_element) (struct cx_list_s *list, size_t index, void const *data)

Member function for inserting a single element.

Implementors SHOULD see to performant implementations for corner cases.


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