simplelist.h

Go to the documentation of this file.
00001 
00022 #if !defined(INC_SIMPLELIST_H)
00023 #define INC_SIMPLELIST_H
00024 
00034 typedef struct tagSimplenode_t
00035 {
00036   const void *element;         
00037   struct tagSimplenode_t *next;        
00038 }
00039 simplenode_t;
00040 
00044 typedef struct tagSimplelist_t
00045 {
00046   simplenode_t *head;        
00047   simplenode_t *tail;        
00048   size_t num_elements;         
00049 }
00050 simplelist_t;
00051 
00055 simplelist_t *simplelist_Create (void);
00056 
00060 void simplelist_Destroy (simplelist_t * L);
00061 
00065 size_t simplelist_Append (simplelist_t * L, const void *element);
00066 
00070 size_t simplelist_GetLength (const simplelist_t * L);
00071 
00075 const void *simplelist_GetElem (const simplelist_t * L, size_t i);
00076 
00080 typedef struct tagSimplelistIterator_t
00081 {
00082   const simplenode_t *cur_elem;
00083   size_t id;
00084 }
00085 simplelist_iter_t;
00086 
00090 void simplelist_InitIter (const simplelist_t * L, simplelist_iter_t * i);
00091 
00095 const void *simplelist_BeginIter (const simplelist_t * L,
00096                   simplelist_iter_t * i);
00097 
00101 const void *simplelist_GetIterObj (const simplelist_iter_t * i);
00102 
00106 size_t simplelist_GetIterId (const simplelist_iter_t * i);
00107 
00112 const void *simplelist_NextIter (simplelist_iter_t * i);
00113 
00117 const void *simplelist_GetLastElem (const simplelist_t * L);
00118 
00119 #endif /* !defined(INC_SIMPLELIST_H) */
00120 
00121 /* eof */

Generated on Wed Sep 19 16:41:18 2007 for BeBOP Optimized Sparse Kernel Interface Library by  doxygen 1.4.6