00001 #pragma once
00002 #ifndef PROBE_CACHE_H
00003 #define PROBE_CACHE_H
00004
00005 #include <sexp-types.h>
00006 #include <SEAP/generic/redblack.h>
00007
00008 DEFRBTREE(pcache, SEXP_t *id; SEXP_t *item);
00009
00010 typedef struct {
00011 TREETYPE(pcache) tree;
00012 } pcache_t;
00013
00014 pcache_t *pcache_new (void);
00015 void pcache_free (pcache_t *cache);
00016
00017 int pcache_sexp_add (pcache_t *cache, const SEXP_t *id, SEXP_t *item);
00018 int pcache_cstr_add (pcache_t *cache, const char *id, SEXP_t *item);
00019
00020 int pcache_sexp_del (pcache_t *cache, const SEXP_t *id);
00021 int pcache_cstr_del (pcache_t *cache, const char *id);
00022
00023 SEXP_t *pcache_sexp_get (pcache_t *cache, const SEXP_t *id);
00024 SEXP_t *pcache_cstr_get (pcache_t *cache, const char *id);
00025
00026 #endif