* The grand 2005-2006 replace.
[lilypond/patrick.git] / lily / include / lilypond-key.hh
blob7d18abd385d2873ee372f4428fdb46ae6b2567af
1 /*
2 lilypond-key.hh -- declare Lilypond_{grob, context}_key
4 source file of the GNU LilyPond music typesetter
6 (c) 2004--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
9 #ifndef LILYPOND_KEY_HH
10 #define LILYPOND_KEY_HH
12 #include "object-key.hh"
13 #include "lily-proto.hh"
14 #include "moment.hh"
16 class Lilypond_grob_key : public Object_key
18 Object_key const *context_;
19 Moment creation_moment_;
20 String grob_name_;
21 int disambiguation_count_;
23 public:
24 Lilypond_grob_key (Object_key const *context,
25 Moment start,
26 String name, int);
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;
36 class Lilypond_context_key : public Object_key
38 Object_key const *parent_context_;
39 Moment start_moment_;
40 String context_name_;
41 String id_;
42 int disambiguation_count_;
44 public:
45 Lilypond_context_key (Object_key const *parent,
46 Moment start,
47 String type,
48 String id,
49 int count);
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;
59 class Lilypond_general_key : public Object_key
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);
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;
76 #endif /* LILYPOND_KEY_HH */