00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef PLINT_DATA_TYPE_H
00026 #error Dont include me directly, but through data/type.h
00027 #endif
00028
00038 struct _plint_ite
00039 {
00040 plint_typ_t typ;
00042 union
00043 {
00044 size_t tab;
00045 hashindex_t hsh;
00046 } crt;
00048 union
00049 {
00050 plint_tab_t tab;
00051 plint_hsh_t hsh;
00052 } mem;
00054 };
00055
00056 __BEGIN_DECLS
00057
00058 void plint_ite_free(plint_ite_t * PITERATOR);
00059 void plint_ite_start(plint_ite_t * PITERATOR);
00060 plint_ref_t plint_ite_data(plint_ite_t * PITERATOR);
00061 int plint_ite_next(plint_ite_t * PITERATOR);
00062 void plint_ite_break(plint_ite_t * PITERATOR);
00063 void plint_ite_sync(plint_ite_t * PITERATOR);
00064 int plint_ite_done(plint_ite_t * PITERATOR);
00065 void plint_ite_stop(plint_ite_t * PITERATOR);
00066
00067 __END_DECLS
00068
00069 #define _PLINT_ITE_INIT(__typ__, __mem__...) { typ: PLINT_##__typ__, mem: { __typ__: __mem__ } }
00070 #define PLINT_ITE_tab_INIT(__tab__...) _PLINT_ITE_INIT(tab, ##__tab__)
00071 #define PLINT_ITE_hsh_INIT(__hsh__...) _PLINT_ITE_INIT(hsh, ##__hsh__)
00072
00073 #define plint_ite_typ(__i__...) ((__i__).typ)
00074
00075 #define _plint_ite_crt(__t__, __i__...) ((__i__).crt.__t__)
00076 #define plint_ite_i(__i__...) _plint_ite_crt(tab, ##__i__)
00077 #define plint_ite_hi(__i__...) _plint_ite_crt(hsh, ##__i__)
00078
00079 #define _plint_ite_mem(__t__, __i__...) ((__i__).mem.__t__)
00080 #define plint_ite_tab(__i__...) _plint_ite_mem(tab, ##__i__)
00081 #define plint_ite_hsh(__i__...) _plint_ite_mem(hsh, ##__i__)
00082