2 request.hh -- declare Request baseclasses.
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
15 #include "virtual-methods.hh"
18 #include "direction.hh"
20 #define DEFAULTACCESSOR(T) virtual T *access_ ## T () { return 0; }
24 An atom of musical information .
25 Hungarian postfix: req
28 class Request : public Music {
34 DECLARE_MY_RUNTIME_TYPEINFO;
35 VIRTUAL_COPY_CONS(Request,Music);
37 /* accessors for children
41 DEFAULTACCESSOR(Barcheck_req)
42 DEFAULTACCESSOR(Script_req)
43 DEFAULTACCESSOR(Span_req)
44 DEFAULTACCESSOR(Spacing_req)
45 DEFAULTACCESSOR(Musical_req)
46 DEFAULTACCESSOR(Command_req)
48 bool equal_b (Request*) const;
50 virtual bool do_equal_b (Request*) const;
51 virtual void do_print() const;
55 #define REQUESTMETHODS(T) \
56 virtual T * access_ ## T() { return this;}\
57 DECLARE_MY_RUNTIME_TYPEINFO;\
58 VIRTUAL_COPY_CONS(T, Request);\
59 virtual void do_print() const
63 /** Put a script above or below this ``note'' or bar. eg upbow, downbow. Why
64 a request? These symbols may conflict with slurs and brackets, so
65 this also a request */
67 class Script_req : public virtual Request {
70 General_script_def *scriptdef_p_;
72 bool do_equal_b (Request*) const;
75 REQUESTMETHODS(Script_req);
77 Script_req (Script_req const&);
82 Requests to start or stop something.
83 This type of request typically results in the creation of a #Spanner#
85 class Span_req : public virtual Request {
87 /// should the spanner start or stop, or is it unwanted?
91 bool do_equal_b (Request*) const;
92 REQUESTMETHODS(Span_req);