]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/scope.hh
release: 1.3.131
[lilypond.git] / lily / include / scope.hh
index bf3e3e63180223415a421ed1b3a91c0d220e68ce..7420997a49e97806a885ce785a4fd3ca67ac25fd 100644 (file)
@@ -3,39 +3,35 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1998--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
 #ifndef SCOPE_HH
 #define SCOPE_HH
 
-#include "dictionary.hh"
 #include "lily-proto.hh"
 #include "lily-guile.hh"
-#include "dictionary-iter.hh"
-#include "protected-scm.hh"
 
-class Scope : private Hash_table<Protected_scm,Identifier*> {
+class Scheme_hash_table;
+class Scope {
+  Scheme_hash_table *id_dict_;
+  Scope (Scope const &);
 public:
-  void print () const;
+  SCM to_alist () const; 
   bool elem_b (String ) const;
   bool elem_b (SCM s) const;
-  Identifier *&elem (String);
-  Identifier *&elem (SCM s);  
-  Scope ();
+
+  bool try_retrieve (SCM key, SCM *val) const;
   
-  Scope (Scope const &);
-  ~Scope ();
-  friend class Scope_iter;
-};
+  SCM scm_elem (String) const;
+  SCM scm_elem (SCM) const;
 
-class Scope_iter : public Hash_table_iter<Protected_scm,Identifier*> {
-public:
-  Scope_iter(Scope const&);
-  String key () const;
-  SCM scm_key () const;
-};
 
+  void set (String, SCM);  
+  Scope (Scheme_hash_table*);
+  
+  friend class Scope_iter;
+};
 #endif /* SCOPE_HH */