]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/request.hh
35401d75d7c38b662c88067ce66abcf18ab3f4cf
[lilypond.git] / lily / include / request.hh
1 /*
2   request.hh -- declare Request baseclasses.
3
4   source file of the GNU LilyPond music typesetter
5
6   (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9 #ifndef REQUEST_HH
10 #define REQUEST_HH
11
12
13 #include "string.hh"
14 #include "moment.hh"
15 #include "virtual-methods.hh"
16 #include "input.hh"
17 #include "music.hh"
18 #include "direction.hh"
19
20
21 /** An atom of musical information.  This is an abstract class for any
22   piece of music that does not contain other Music.
23   
24   Hungarian postfix: req
25
26  */
27 class Request : public Music {
28 public:
29   VIRTUAL_COPY_CONS(Music);
30   bool equal_b (Request const*) const;
31 protected:
32   virtual bool do_equal_b (Request const*) const;
33   virtual void do_print() const;
34 };
35
36
37
38 class Script_req : public virtual Request
39 {
40 public:
41   Direction dir_;
42   void set_direction (Direction d ) { dir_ =  d; }
43   Direction get_direction () const { return dir_; }
44
45   VIRTUAL_COPY_CONS(Music);
46   Script_req ();
47 };
48
49
50 /**
51   Requests to start or stop something.
52  This type of request typically results in the creation of a #Spanner#
53 */
54 class Span_req  : public virtual Request  {
55 public:
56   /// should the spanner start or stop, or is it unwanted?
57   Direction span_dir_;
58   String span_type_str_;
59   
60   Span_req();
61 protected:
62   virtual bool do_equal_b (Request const*) const;
63   virtual void do_print() const;
64   VIRTUAL_COPY_CONS(Music);
65 };
66
67 /**
68   Start a tie at this note, end it at the next
69  */
70 class Tie_req : public Request {
71 public:
72   VIRTUAL_COPY_CONS(Music);
73 };
74
75 #endif