]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/object-key-dumper.hh
* scm/music-functions.scm (has-request-chord): don't use
[lilypond.git] / lily / include / object-key-dumper.hh
1 /*
2   object-key-dumper.hh -- declare Object_key_dumper
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 2004--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
7
8 */
9
10 #ifndef OBJECT_KEY_DUMPER_HH
11 #define OBJECT_KEY_DUMPER_HH
12
13 #include <map>
14
15 #include "object-key.hh"
16
17 typedef std::map<Object_key const*, Object_key const*, Object_key_less> Key_to_key_map;
18 typedef std::map<Object_key const*, int> Pointer_to_int_map;
19 typedef std::map<int, Object_key const *> Int_to_key_map;
20
21 class Object_key_dumper
22 {
23   SCM file_contents_;
24   Key_to_key_map serialized_keys_;
25   Pointer_to_int_map key_serial_numbers_;
26   int next_available_;
27   
28   SCM key_serial (int);
29   SCM serialize_key (Object_key const *);
30   DECLARE_SMOBS (Object_key_dumper, );
31 public:
32   Object_key_dumper (); 
33   SCM get_file_contents () const;
34   SCM dump_key (Object_key const *);
35 };
36
37 DECLARE_UNSMOB(Object_key_dumper, key_dumper);
38
39 #endif /* OBJECT_KEY_DUMPER_HH */
40