Main Page   Data Structures   File List   Data Fields   Globals  

ccp4_array.h

Go to the documentation of this file.
00001 
00045 #ifndef __CCP4_ARRAY_INC
00046 #define __CCP4_ARRAY_INC
00047 
00048 #ifdef  __cplusplus
00049 extern "C" {
00050 #endif
00051 
00052 #include <stdlib.h>
00053 
00055 typedef const void *ccp4_constptr;
00057 typedef char *ccp4_byteptr;
00059 typedef void *ccp4_ptr;
00060 
00062 typedef struct ccp4array_base_ {
00063   int size, capacity;
00064 } ccp4array_base;
00065 
00071 #define ccp4array_new(v) ccp4array_new_((ccp4_ptr*)(&v))
00072 
00079 #define ccp4array_new_size(v,s) ccp4array_new_size_((ccp4_ptr*)(&v),s,sizeof(*v))
00080 
00089 #define ccp4array_resize(v,s) ccp4array_resize_((ccp4_ptr*)(&v),s,sizeof(*v))
00090 
00099 #define ccp4array_reserve(v,s) ccp4array_reserve_((ccp4_ptr*)(&v),s,sizeof(*v))
00100 
00107 #define ccp4array_append(v,d) ccp4array_append_((ccp4_ptr*)(&v),(ccp4_constptr)(&d),sizeof(*v))
00108 
00116 #define ccp4array_append_n(v,d,n) ccp4array_append_n_((ccp4_ptr*)(&v),(ccp4_constptr)(&d),n,sizeof(*v))
00117 
00125 #define ccp4array_append_list(v,l,n) ccp4array_append_list_((ccp4_ptr*)(&v),(ccp4_constptr)l,n,sizeof(*v))
00126 
00134 #define ccp4array_insert(v,i,d) ccp4array_insert_((ccp4_ptr*)(&v),i,(ccp4_constptr)(&d),sizeof(*v))
00135 
00142 #define ccp4array_delete_ordered(v,i) ccp4array_delete_ordered_((ccp4_ptr*)(&v),i,sizeof(*v))
00143 
00149 #define ccp4array_delete(v,i) ccp4array_delete_((ccp4_ptr*)(&v),i,sizeof(*v))
00150 
00155 #define ccp4array_delete_last(v) ccp4array_delete_last_((ccp4_ptr*)(&v),sizeof(*v))
00156 
00161 #define ccp4array_size(v) ccp4array_size_((ccp4_constptr*)(&v))
00162 
00167 #define ccp4array_free(v) ccp4array_free_((ccp4_ptr*)(&v))
00168 
00169 ccp4_ptr ccp4array_new_(ccp4_ptr *p);
00170 ccp4_ptr ccp4array_new_size_(ccp4_ptr *p, const int size, const size_t reclen);
00171 void ccp4array_resize_(ccp4_ptr *p, const int size, const size_t reclen);
00172 void ccp4array_reserve_(ccp4_ptr *p, const int size, const size_t reclen);
00173 void ccp4array_append_(ccp4_ptr *p, ccp4_constptr data, const size_t reclen);
00174 void ccp4array_append_n_(ccp4_ptr *p, ccp4_constptr data, const int n, const size_t reclen);
00175 void ccp4array_append_list_(ccp4_ptr *p, ccp4_constptr data, const int n, const size_t reclen);
00176 int ccp4array_size_(ccp4_constptr *p);
00177 void ccp4array_free_(ccp4_ptr *p);
00178 
00179 #ifdef __cplusplus
00180 } 
00181 #endif
00182 
00183 #endif /* __CCP4_ARRAY_INC */

Generated at Mon Dec 10 16:27:06 2001 by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001