]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/scope.hh
19f5313536f5a3a784ce6846de0d11061db0e3a8
[lilypond.git] / lily / include / scope.hh
1 /*   
2   scope.hh -- declare Scope
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 1998--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10 #ifndef SCOPE_HH
11 #define SCOPE_HH
12
13 #include "lily-proto.hh"
14 #include "lily-guile.hh"
15
16 class Protected_scm;
17 class Scope {
18   Hash_table<Protected_scm,Identifier*> *id_dict_;
19 public:
20   bool elem_b (String ) const;
21   bool elem_b (SCM s) const;
22   Identifier *&elem (String);
23   Identifier *&elem (SCM s);  
24   Scope ();
25   
26   Scope (Scope const &);
27   ~Scope ();
28   friend class Scope_iter;
29 };
30
31 class Scope_iter {
32   Hash_table_iter<Protected_scm,Identifier*> * iter_;
33 public:
34   void operator ++(int);
35   bool ok ()const;
36   Scope_iter(Scope const&);
37   String key () const;
38   Identifier* val () const;
39   SCM scm_key () const;
40 };
41
42 #endif /* SCOPE_HH */
43