]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/lilypond-key.hh
2b8ad9ddf91ca76c9485cb725bf5558b5374d586
[lilypond.git] / lily / include / lilypond-key.hh
1 /*
2   lilypond-key.hh -- declare Lilypond_{grob, context}_key
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 2004--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
8
9 #ifndef LILYPOND_KEY_HH
10 #define LILYPOND_KEY_HH
11
12 #include "object-key.hh"
13 #include "lily-proto.hh"
14 #include "moment.hh"
15
16 class Lilypond_grob_key : public Object_key
17 {
18   Object_key const *context_;
19   Moment creation_moment_;
20   String grob_name_;
21   int disambiguation_count_;
22
23 public:
24   Lilypond_grob_key (Object_key const *context,
25                      Moment start,
26                      String name, int);
27
28   static Object_key *from_scheme (SCM);
29 protected:
30   virtual int get_type () const;
31   virtual void derived_mark () const;
32   virtual int do_compare (Object_key const *a) const;
33   virtual SCM as_scheme () const;
34 };
35
36 class Lilypond_context_key : public Object_key
37 {
38   Object_key const *parent_context_;
39   Moment start_moment_;
40   String context_name_;
41   String id_;
42   int disambiguation_count_;
43
44 public:
45   Lilypond_context_key (Object_key const *parent,
46                         Moment start,
47                         String type,
48                         String id,
49                         int count);
50
51   static Object_key *from_scheme (SCM);
52 protected:
53   virtual int get_type () const;
54   virtual int do_compare (Object_key const *a) const;
55   virtual void derived_mark () const;
56   virtual SCM as_scheme () const;
57 };
58
59 class Lilypond_general_key : public Object_key
60 {
61   Object_key const *parent_;
62   String name_;
63   int disambiguation_count_;
64 public:
65   Lilypond_general_key (Object_key const *parent, String name,
66                         int count);
67
68   static Object_key *from_scheme (SCM);
69 protected:
70   virtual int get_type () const;
71   virtual int do_compare (Object_key const *a) const;
72   virtual void derived_mark () const;
73   virtual SCM as_scheme () const;
74 };
75
76 #endif /* LILYPOND_KEY_HH */
77