]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/lilypond-key.hh
* lily/context.cc (Context): take key argument in ctor.
[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 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 #include "string.hh"
17
18 class Lilypond_grob_key : public Object_key
19 {
20   Object_key const *context_;
21   Moment creation_moment_;
22   String grob_name_;
23
24   // FIXME: need to figure out smart solution for
25   // the problem of creating
26   // many equally named grobs at the same time.
27   
28   //  int ambiguity_count_;
29 public:
30   Lilypond_grob_key(Object_key const*context,
31                     Moment start,
32                     String name);
33 protected:
34   virtual int get_type () const;
35   virtual void derived_mark () const; 
36   virtual int do_compare (Object_key const* a) const;
37 };
38
39 class Lilypond_context_key : public Object_key
40 {
41   Object_key const *parent_context_;
42   Moment start_moment_;
43   String context_name_;
44   String id_;
45
46   // see above. 
47   // int ambiguity_count_;
48 public:
49   Lilypond_context_key (Object_key const * parent,
50                         Moment start,
51                         String type,
52                         String id);
53     //                  int count);
54 protected:
55   virtual int get_type () const;
56   virtual int do_compare (Object_key const* a) const;
57   virtual void derived_mark () const; 
58 };
59
60
61 #endif /* LILYPOND_KEY_HH */
62