BEAST/BSE - Better Audio System and Sound Engine  0.8.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
sfiustore.hh
Go to the documentation of this file.
00001  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
00002 #ifndef __SFI_USTORE_H__
00003 #define __SFI_USTORE_H__
00004 
00005 #include <sfi/sfitypes.hh>
00006 
00007 G_BEGIN_DECLS
00008 
00009 
00010 /* --- typedefs --- */
00011 /* typedef struct _SfiUStore SfiUStore; */
00012 /* typedef struct _SfiUPool  SfiUPool; */
00013 typedef gboolean (*SfiUStoreForeach)    (gpointer        data,
00014                                          gulong          unique_id,
00015                                          gpointer        value);
00016 typedef gboolean (*SfiUPoolForeach)     (gpointer        data,
00017                                          gulong          unique_id);
00018 typedef gboolean (*SfiPPoolForeach)     (gpointer        data,
00019                                          gpointer        pointer);
00020 
00021 
00022 /* --- unique ID store --- */
00023 SfiUStore*      sfi_ustore_new          (void);
00024 gpointer        sfi_ustore_lookup       (SfiUStore       *store,
00025                                          gulong           unique_id);
00026 void            sfi_ustore_insert       (SfiUStore       *store,
00027                                          gulong           unique_id,
00028                                          gpointer         value);
00029 void            sfi_ustore_remove       (SfiUStore       *store,
00030                                          gulong           unique_id);
00031 void            sfi_ustore_foreach      (SfiUStore       *store,
00032                                          SfiUStoreForeach foreach,
00033                                          gpointer         data);
00034 void            sfi_ustore_destroy      (SfiUStore       *store);
00035 
00036 
00037 /* --- unique ID pool --- */
00038 SfiUPool*       sfi_upool_new           (void);
00039 gboolean        sfi_upool_lookup        (SfiUPool        *pool,
00040                                          gulong           unique_id);
00041 void            sfi_upool_set           (SfiUPool        *pool,
00042                                          gulong           unique_id);
00043 void            sfi_upool_unset         (SfiUPool        *pool,
00044                                          gulong           unique_id);
00045 void            sfi_upool_foreach       (SfiUPool        *pool,
00046                                          SfiUPoolForeach  foreach,
00047                                          gpointer         data);
00048 void            sfi_upool_destroy       (SfiUPool        *pool);
00049 gulong*         sfi_upool_list          (SfiUPool        *pool,
00050                                          guint           *n_ids);
00051 
00052 
00053 /* --- pointer pool --- */
00054 SfiPPool*       sfi_ppool_new           (void);
00055 gboolean        sfi_ppool_lookup        (SfiPPool        *pool,
00056                                          gpointer         unique_ptr);
00057 void            sfi_ppool_set           (SfiPPool        *pool,
00058                                          gpointer         unique_ptr);
00059 void            sfi_ppool_unset         (SfiPPool        *pool,
00060                                          gpointer         unique_ptr);
00061 void            sfi_ppool_foreach       (SfiPPool        *pool,
00062                                          SfiPPoolForeach  foreach,
00063                                          gpointer         data);
00064 GSList*         sfi_ppool_slist         (SfiPPool        *pool);
00065 void            sfi_ppool_destroy       (SfiPPool        *pool);
00066 
00067 
00068 
00069 G_END_DECLS
00070 
00071 #endif /* __SFI_USTORE_H__ */
00072 
00073 /* vim:set ts=8 sts=2 sw=2: */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines