00001
00002
00003
00004
00005
00006 #ifdef NPS_VOC_T
00007 #ifndef NPS_VOC_GLIB
00008 #error "NPS_VOC is already defined"
00009 #endif
00010 #else
00011 #define NPS_VOC_GLIB 1
00012 #define NPS_VOC_T GHashTable
00013 #include "glib.h"
00014
00015 #define NPS_VOC_NEW(size) g_hash_table_new(g_str_hash,g_str_equal)
00016 #define NPS_VOC_DEL(h) g_hash_table_destroy((h))
00017 #define NPS_VOC_SET(h,k,v) g_hash_table_insert((h),(k),(v))
00018 #define NPS_VOC_GET(h,k) g_hash_table_lookup((h),(k))
00019 #define NPS_VOC_SIZE(h) g_hash_table_size((h))
00020 #define NPS_VOC_FOREACH(h,f,d) g_hash_table_foreach((h),(f),(d))
00021
00022 #define NPS_VOC_SAVE(h,f) nps_voc_g_hash_save((h),(f))
00023 #define NPS_VOC_LOAD(h,f) nps_voc_g_hash_load((h),(f))
00024 #define NPS_VOC_INVERT(h) nps_voc_g_invert((h))
00025
00026 #endif
00027
00028