Main Page   File List   File Members   Related Pages  

frdi_list.c File Reference

a dynamically extendable linked list More...

#include "frdi.h"

Functions

void frdiListJoin (frdi_list *list, frdi_list_node *A, frdi_list_node *B)
frdi_list_node * frdiListNodeNew (void *value)
frdi_list * frdiListNew ()
void frdiListSetStringHandler (frdi_list *list, frdi_handler *handler)
void frdiListFree (frdi_list *list)
void frdiListSetException (frdi_list *list, frdi_exception *eh)
frdi_list_node * frdiListAdd (frdi_list *list, void *value)
frdi_list_node * frdiListSet (frdi_list *list, int idx, void *value)
frdi_list_node * frdiListInsert (frdi_list *list, int idx, void *value)
void frdiListRemove (frdi_list *list, int idx)
void * frdiListGet (frdi_list *list, int idx)
frdi_list_node * frdiListGetNode (frdi_list *list, int idx)
void * frdiListPop (frdi_list *list)
void frdiListPush (frdi_list *list, void *value)
frdi_list * frdiListIterate (frdi_list *list, frdi_handler *handler)
frdi_list * frdiListMap (frdi_list *list, frdi_handler *handler)
int frdiListGetSize (frdi_list *list)
char * frdiListDisplay (frdi_list *list)
char * frdiListString (frdi_list *list, void *value)
int frdiListCompare (frdi_list *list, void *A, void *B)
int frdiListFind (frdi_list *list, void *value)


Detailed Description

a dynamically extendable linked list

Author:
Douglas Reay <douglas-legal@reay.org>
Warning:

Function Documentation

void frdiListJoin frdi_list *    list,
frdi_list_node *    A,
frdi_list_node *    B
 

Join two nodes together

frdi_list_node* frdiListNodeNew void *    value
 

Create Object

frdi_list* frdiListNew  
 

Create Object

void frdiListSetStringHandler frdi_list *    list,
frdi_handler *    handler
 

what type is this list? takes a method that casts the type to a string

void frdiListFree frdi_list *    list
 

Releases the list and all the node, but not their values

void frdiListSetException frdi_list *    list,
frdi_exception *    eh
 

Set the exception handler

frdi_list_node* frdiListAdd frdi_list *    list,
void *    value
 

Creates a new node holding the value, and adds it to the end of the list

frdi_list_node* frdiListSet frdi_list *    list,
int    idx,
void *    value
 

Set the value of an existing node in the list

frdi_list_node* frdiListInsert frdi_list *    list,
int    idx,
void *    value
 

Insert the value as a new node in the list

void frdiListRemove frdi_list *    list,
int    idx
 

Remove a node from the list

void* frdiListGet frdi_list *    list,
int    idx
 

Get the value held in a node of the list

frdi_list_node* frdiListGetNode frdi_list *    list,
int    idx
 

Get a node of the list

void* frdiListPop frdi_list *    list
 

Remove the last node and return its value

void frdiListPush frdi_list *    list,
void *    value
 

see frdiListAdd()

frdi_list* frdiListIterate frdi_list *    list,
frdi_handler *    handler
 

Calls the function 'handler' with the values, one by one (NOT IMPLEMENTED)

frdi_list* frdiListMap frdi_list *    list,
frdi_handler *    handler
 

Calls the function 'handler' with the nodes, one by one It expects back node objects and links the non-NULL ones into a new list. (NOT IMPLEMENTED)

int frdiListGetSize frdi_list *    list
 

how many nodes are there in the list?

char* frdiListDisplay frdi_list *    list
 

Return a string representation of the list

char* frdiListString frdi_list *    list,
void *    value
 

return a string representation of a void*

int frdiListCompare frdi_list *    list,
void *    A,
void *    B
 

A lt B == < 0 A eq B == 0 A gt B == > 0

int frdiListFind frdi_list *    list,
void *    value
 

Return the index of the first node whose value matches value


Generated on Wed Aug 18 13:24:00 2004 for Project Fairdice by doxygen1.2.18