libdacav 0.9.0
/home/dacav/Projects/libdacav/libdacav/dacav/dacavlist.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2009 2010 Giovanni Simoni
00003  *
00004  * This file is part of LibDacav.
00005  *
00006  * LibDacav is free software: you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation, either version 3 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * LibDacav is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with LibDacav.  If not, see <http://www.gnu.org/licenses/>.
00018  *
00019  */
00020 
00026 #ifndef __defined_dacav_dacavlist_h
00027 #define __defined_dacav_dacavlist_h
00028 
00029 #include <dacav/dacav.h>
00030 
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif
00034 
00037 
00039 typedef struct dlist dlist_t;
00040 
00045 dlist_t *dlist_new ();
00046 
00064 dlist_t *dlist_slice (dlist_t *l, unsigned from, unsigned to,
00065                       dcopy_cb_t cp);
00066 
00075 dlist_t *dlist_copy (dlist_t *l, dcopy_cb_t cp);
00076 
00085 dlist_t *dlist_sort (dlist_t *l, dcmp_cb_t cmp);
00086 
00093 void dlist_free (dlist_t *l, dfree_cb_t f);
00094 
00104 dlist_t *dlist_append (dlist_t *l, void *o);
00105 
00115 dlist_t *dlist_push (dlist_t *l, void *o);
00116 
00128 dlist_t *dlist_pop (dlist_t *l, void **o);
00129 
00135 int dlist_empty (dlist_t *l);
00136 
00152 dlist_t *dlist_foreach (dlist_t *l, diter_cb_t f, void *ud);
00153 
00173 dlist_t *dlist_filter (dlist_t *l, dfilter_cb_t f, void *ud);
00174 
00193 diter_t *dlist_iter_new (dlist_t **l, dcprm_t *cprm);
00194 
00200 void dlist_iter_free (diter_t *i);
00201 
00204 #ifdef __cplusplus
00205 }
00206 #endif
00207 
00208 #endif // __defined_dacav_dacavlist_h
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator