libfossil
fsl_list Struct Reference

Generic list container type. More...

#include "fossil-util.h"

Data Fields

fsl_size_t capacity
 Number of slots allocated in this->list. More...
 
void ** list
 Array of entries. More...
 
fsl_size_t used
 Number of "used" entries in the list. More...
 

Detailed Description

Generic list container type.

This is used heavily by the Fossil API for storing arrays of dynamically-allocated objects. It is not useful as a non-pointer-array replacement.

It is up to the APIs using this type to manage the entry count member and use fsl_list_reserve() to manage the "capacity" member.

See also
fsl_list_reserve()
fsl_list_append()
fsl_list_visit()

Definition at line 150 of file fossil-util.h.

Field Documentation

fsl_size_t fsl_list::capacity

Number of slots allocated in this->list.

Use fsl_list_reserve() to modify this. Doing so might move the this->list pointer but the values it points to will stay stable.

Definition at line 165 of file fossil-util.h.

void** fsl_list::list

Array of entries.

It contains this->capacity entries, this->count of which are "valid" (in use).

Definition at line 155 of file fossil-util.h.

Referenced by fsl::FslListIterator< fsl_card_T const * >::FslListIterator(), and fsl::FslListIterator< fsl_card_T const * >::operator++().

fsl_size_t fsl_list::used

Number of "used" entries in the list.

Definition at line 159 of file fossil-util.h.

Referenced by fsl::FslListIterator< fsl_card_T const * >::FslListIterator(), and fsl::FslListIterator< fsl_card_T const * >::operator++().


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