]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/context-key-manager.hh
Merge branch 'jneeman' of git+ssh://jneem@git.sv.gnu.org/srv/git/lilypond into jneeman
[lilypond.git] / lily / include / context-key-manager.hh
1 /*
2   context-key-manager.hh -- declare Context_key_manager
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
7
8 */
9
10 #ifndef CONTEXT_KEY_MANAGER_HH
11 #define CONTEXT_KEY_MANAGER_HH
12
13 #include "lily-proto.hh"
14
15 #include <map>
16 using namespace std;
17
18 class Context_key_manager
19 {
20   Object_key const *key_;
21   map<string, int> grob_counts_;
22   map<string, int> context_counts_;
23   
24
25 protected:
26   friend class Context;
27   
28   Context_key_manager (Object_key const *);
29   Context_key_manager (Context_key_manager const &src);
30
31
32   void unprotect () const;
33   void gc_mark () const;
34   void clear ();
35   Object_key const *key () const { return key_; }
36   Object_key const *create_grob_key (Moment, string);
37   Object_key const *get_grob_key (Moment, string);
38   Object_key const *get_context_key (Moment, string, string);
39 };
40
41 #endif /* CONTEXT_KEY_MANAGER_HH */
42
43