]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/request.hh
72134e8c334916475f80cb8083e2d3afb082cd2e
[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--1999 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 ~Request(){}
30   VIRTUAL_COPY_CONS(Music);
31   bool equal_b (Request*) const;
32 protected:
33   virtual bool do_equal_b (Request*) const;
34   virtual void do_print() const;
35 };
36
37
38
39 class G_script_req : public virtual Request
40 {
41 public:
42   Direction dir_;
43   VIRTUAL_COPY_CONS(Music);
44 };
45
46 /** Put a script above or below this ``note'' or bar. eg upbow, downbow. Why
47   a request? These symbols may conflict with slurs and brackets, so
48   this also a request */
49
50 class Script_req  : public virtual G_script_req { 
51 public:
52   General_script_def *scriptdef_p_;
53   
54   bool do_equal_b (Request*) const;
55
56   Script_req();
57   VIRTUAL_COPY_CONS(Music);
58   virtual void do_print () const;
59   ~Script_req();
60   Script_req (Script_req const&);
61 };
62
63
64 /**
65   Requests to start or stop something.
66  This type of request typically results in the creation of a #Spanner#
67 */
68 class Span_req  : public virtual Request  {
69 public:
70   /// should the spanner start or stop, or is it unwanted?
71   Direction spantype_;
72
73   Span_req();
74 protected:
75   virtual bool do_equal_b (Request*) const;
76   virtual void do_print() const;
77   VIRTUAL_COPY_CONS(Music);
78 };
79
80 /**
81   Start a tie at this note, end it at the next
82  */
83 class Tie_req : public Request {
84 public:
85   VIRTUAL_COPY_CONS(Music);
86 };
87
88 /** Start / stop a beam at this note */
89 class Beam_req  : public Span_req  {
90 public:
91   VIRTUAL_COPY_CONS(Music);
92 };
93
94 #endif