solidc
Robust collection of general-purpose cross-platform C libraries and data structures designed for rapid and safe development in C
Loading...
Searching...
No Matches
Public Attributes | List of all members
slist Struct Reference

#include <slist.h>

Collaboration diagram for slist:
[legend]

Public Attributes

slist_node_thead
 
slist_node_ttail
 
size_t size
 
size_t elem_size
 

Detailed Description

A singly-linked list data structure. Maintains head and tail pointers for O(1) append operations. Stores elements of uniform size specified at list creation.

Definition at line 32 of file slist.h.

Member Data Documentation

◆ elem_size

size_t slist::elem_size

Size in bytes of each element stored in the list.

Definition at line 40 of file slist.h.

Referenced by slist_index_of(), slist_insert(), slist_new(), slist_push_back(), and slist_push_front().

◆ head

slist_node_t* slist::head

Pointer to the first node in the list. NULL if empty.

Definition at line 34 of file slist.h.

Referenced by slist_clear(), slist_get(), slist_index_of(), slist_insert(), slist_new(), slist_pop_front(), slist_push_back(), slist_push_front(), and slist_remove().

◆ size

size_t slist::size

Number of elements currently in the list.

Definition at line 38 of file slist.h.

Referenced by slist_clear(), slist_get(), slist_insert(), slist_new(), slist_pop_front(), slist_push_back(), slist_push_front(), slist_remove(), and slist_size().

◆ tail

slist_node_t* slist::tail

Pointer to the last node in the list for O(1) append. NULL if empty.

Definition at line 36 of file slist.h.

Referenced by slist_clear(), slist_new(), slist_pop_front(), slist_push_back(), slist_push_front(), and slist_remove().


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