2 scm-hash.hh -- declare Scheme hasher.
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
18 auto resizing hash table.
20 1. ALWAYS USE THIS AS VIA A POINTER, i.e.
23 Scheme_hash_table * tab;
29 Scheme_hash_table tab;
33 2. UPON DESTRUCTION, DO
35 scm_gc_unprotect_object (tab->self_scm_);
39 class Scheme_hash_table
42 bool try_retrieve (SCM key, SCM *val);
43 bool contains (SCM key) const;
46 WARNING: putting something in assumes responsibility for cleaning
48 void set (SCM k, SCM v);
49 SCM get (SCM k) const;
52 void operator = (Scheme_hash_table const &);
53 Scheme_hash_table (Scheme_hash_table const &);
55 SCM to_alist () const;
61 DECLARE_SMOBS (Scheme_hash_table, foo);
65 #endif /* SCM_HASH_HH */