]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/lilypond-key.hh
24d0a3f36bfe9217f1a73103801f509ed8f27a33
[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
10 #ifndef LILYPOND_KEY_HH
11 #define LILYPOND_KEY_HH
12
13 #include "object-key.hh"
14 #include "lily-proto.hh"
15 #include "moment.hh"
16
17 class Lilypond_grob_key : public Object_key
18 {
19   Object_key const *context_;
20   Moment creation_moment_;
21   String grob_name_;
22   int disambiguation_count_;
23
24 public:
25   Lilypond_grob_key (Object_key const *context,
26                      Moment start,
27                      String name, int);
28
29   static Object_key *from_scheme (SCM);
30 protected:
31   virtual int get_type () const;
32   virtual void derived_mark () const; 
33   virtual int do_compare (Object_key const* a) const;
34   virtual SCM as_scheme () const;
35 };
36
37 class Lilypond_context_key : public Object_key
38 {
39   Object_key const *parent_context_;
40   Moment start_moment_;
41   String context_name_;
42   String id_;
43   int disambiguation_count_;
44
45 public:
46   Lilypond_context_key (Object_key const * parent,
47                         Moment start,
48                         String type,
49                         String id,
50                         int count);
51
52   static Object_key *from_scheme (SCM);
53 protected:
54   virtual int get_type () const;
55   virtual int do_compare (Object_key const* a) const;
56   virtual void derived_mark () const; 
57   virtual SCM as_scheme () const;
58 };
59
60 class Lilypond_general_key : public Object_key
61 {
62   Object_key const *parent_;
63   String name_;
64   int disambiguation_count_;
65 public:
66   Lilypond_general_key (Object_key const *parent, String name,
67                         int count);
68
69   static Object_key *from_scheme (SCM);
70 protected:
71   virtual int get_type () const;
72   virtual int do_compare (Object_key const* a) const;
73   virtual void derived_mark () const; 
74   virtual SCM as_scheme () const;
75 };
76
77 #endif /* LILYPOND_KEY_HH */
78