sphore 0.0.1
SPH openGL rendering engine
|
00001 /******************************************************************** 00002 * sphore - SPH Opengl Rendering Engine 00003 * 00004 * This file is (or was) part of sphore. 00005 * sphore comes with ABSOLUTELY NO WARRANTY. 00006 * This is free software; and you are welcome to redistribute 00007 * it under the terms of the GNU General Public License 00008 * (see LICENSE file for details) and the provision that 00009 * this notice remains intact. If you modify this file, please 00010 * note section 2a) of the GPLv2 states that: 00011 * 00012 * a) You must cause the modified files to carry prominent notices 00013 * stating that you changed the files and the date of any change. 00014 * 00015 * Copyright (C) 2011 James Wetter. All rights reserved. 00016 * Contact: wetter.j@gmail.com 00017 * 00018 ********************************************************************/ 00019 00025 #ifndef LIST_H 00026 #define LIST_H 00027 #include "node.h" 00028 #include "sphore.h" 00029 00035 typedef struct _list list_t; 00042 typedef struct _list_iterator list_iterator_t; 00043 00050 list_t *list_create (void); 00051 00057 void list_destroy (list_t * list); 00058 00066 void list_destroy_data (list_t * list, void (*destroy_func) (void *)); 00067 00075 _SREnodeID list_add_first (list_t * list, void *data); 00076 00084 _SREnodeID list_add_last (list_t * list, void *data); 00085 00097 SREbool list_remove (list_t * list, _SREnodeID id); 00098 00111 SREbool list_remove_data (list_t * list, _SREnodeID id, 00112 void (*destroy_func) (void *)); 00113 00122 list_iterator_t *list_iterator_create (list_t * list); 00123 00129 void list_iterator_destroy (list_iterator_t * it); 00130 00137 _SREnodeID list_iterator_get_id (list_iterator_t * it); 00138 00145 void *list_iterator_get_data (list_iterator_t * it); 00146 00155 void list_iterator_remove (list_iterator_t * it); 00156 00165 void list_iterator_remove_data (list_iterator_t * it, 00166 void (*destroy_func) (void *)); 00167 00176 _SREnodeID list_iterator_add (list_iterator_t * it, void *data); 00177 00187 SREbool list_iterator_find (list_iterator_t * it, _SREnodeID id); 00188 00195 void list_iterator_reset (list_iterator_t * it); 00196 00205 SREbool list_iterator_move (list_iterator_t * it); 00206 00207 SREbool list_iterator_has_next (list_iterator_t * it); 00208 #endif