]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/scope.hh
release: 1.3.19
[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   void print () const;
21   bool elem_b (String ) const;
22   bool elem_b (SCM s) const;
23   Identifier *&elem (String);
24   Identifier *&elem (SCM s);  
25   Scope ();
26   
27   Scope (Scope const &);
28   ~Scope ();
29   friend class Scope_iter;
30 };
31
32 class Scope_iter {
33   Hash_table_iter<Protected_scm,Identifier*> * iter_;
34 public:
35   void operator ++(int);
36   bool ok ()const;
37   Scope_iter(Scope const&);
38   String key () const;
39   Identifier* val () const;
40   SCM scm_key () const;
41 };
42
43 #endif /* SCOPE_HH */
44