]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/scm-hash.hh
patch::: 1.3.26.hwn3
[lilypond.git] / lily / include / scm-hash.hh
1 /*   
2   scm-hash.hh -- declare Scheme hasher.
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10 #ifndef SCM_HASH_HH
11 #define SCM_HASH_HH
12
13 #include "lily-guile.hh"
14 #include "hash-table.hh"
15 #include "smobs.hh"
16
17 /**
18    auto resizing hash table. This should come from GUILE.
19  */
20 class Scheme_hash_table : private Hash_table<SCM,SCM>
21 {
22 public:
23   //  bool elem_b (SCM k) const;
24   Hash_table<SCM,SCM>::try_retrieve;
25   Hash_table<SCM,SCM>::elem_b;  
26   /**
27      WARNING: putting something in assumes responsibility for cleaning
28      up.  */
29   void set (SCM k, SCM v);
30   SCM get (SCM k);
31   
32   Scheme_hash_table ();
33   void operator = (Scheme_hash_table const &); 
34   Scheme_hash_table (Scheme_hash_table const &);
35   virtual ~Scheme_hash_table ();
36   DECLARE_SMOBS;
37   SCM to_alist () const;
38 };
39
40 #endif /* SCM_HASH_HH */
41