The List Library  0.2.1
Data Fields
list_t Struct Reference

represents a node in a list. More...

#include <list.h>

Collaboration diagram for list_t:
Collaboration graph
[legend]

Data Fields

void * data
struct list_tnext

Detailed Description

represents a node in a list.

This implementation for a linked list does not employ a separate data structure for the head or tail node; see the implementation of the Doubly-Linked List Library for what this means. By imposing on its users the responsability to make sure that a list given to the library functions is appropriate for their tasks, it attains simpler implementation.

The detail of struct list_t is intentionally exposed to the users (as opposed to be hidden in an opaque type) because doing so is more useful. For example, a user does not need to complicate the code by calling, say, list_push() just in order to make a temporary list node. Declaring it as having the type of list_t (as opposed to list_t *) is enough. In addition, an list_t object can be embedded in a user-created data structure directly.


Field Documentation

void* list_t::data

pointer to data

pointer to next node


The documentation for this struct was generated from the following file:
 All Data Structures Files Functions Variables Defines