Tlist Struct Reference

Detailed Description

A double linked collection of nodes where each node is a Tbuf.

The data is stored as a sequence of bytes, without any regard about what is the meaning of the data. For instance to build a list of doubles we use sizeof(double) as the size of the data stored in the list.
Note that, if the elements stored in the list are more complex types with pointers to other data, we only copy the pointers and not the data pointed by them.

See Also
list.h, list.c.

Definition at line 46 of file list.h.

Data Fields

unsigned int ele_size
unsigned int num_ele

Field Documentation

Tbuf* Tlist::first

First node in the list.

Definition at line 48 of file list.h.

Referenced by AddFirstElement(), DeleteAllItems(), ExtractFirst(), First(), HasElement(), InitList(), MoveTo(), PrintList(), PrivAddElement(), and PrivDelEle().

Tbuf* Tlist::last

Last node in the list.

Definition at line 49 of file list.h.

Referenced by AddLastElement(), ExtractLast(), InitList(), Last(), PrivAddElement(), and PrivDelEle().

unsigned int Tlist::ele_size

Size of the elements inside the list (in bytes).

Definition at line 50 of file list.h.

Referenced by ExtractCurrent(), ExtractFirst(), ExtractLast(), InitList(), and PrivAddElement().

unsigned int Tlist::num_ele

Number of elements of the list.

Definition at line 51 of file list.h.

Referenced by InitList(), ListEmpty(), ListSize(), MoveTo(), PrivAddElement(), and PrivDelEle().