2 scm-hash.hh -- declare Scheme hasher.
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
15 auto resizing hash table.
17 1. ALWAYS USE THIS AS VIA A POINTER, i.e.
20 Scheme_hash_table * tab;
26 Scheme_hash_table tab;
30 2. UPON DESTRUCTION, DO
32 scm_gc_unprotect_object (tab->self_scm_);
35 class Scheme_hash_table
38 bool try_retrieve (SCM key, SCM *val);
39 bool contains (SCM key) const;
42 WARNING: putting something in assumes responsibility for cleaning
44 void set (SCM k, SCM v);
45 SCM get (SCM k) const;
48 void operator = (Scheme_hash_table const &);
49 Scheme_hash_table (Scheme_hash_table const &);
51 SCM to_alist () const;
57 DECLARE_SMOBS (Scheme_hash_table);
60 #endif /* SCM_HASH_HH */