2 request.hh -- declare Request baseclasses.
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
15 #include "virtual-methods.hh"
20 a voice element wants something printed.
21 Hungarian postfix: req
24 class Request : public Music {
32 DECLARE_MY_RUNTIME_TYPEINFO;
33 VIRTUAL_COPY_CONS(Request,Music);
35 virtual MInterval time_int() const;
36 virtual void transpose(Melodic_req const &){}
37 virtual Moment duration() const { return 0; }
39 /* accessors for children
42 virtual Barcheck_req *barcheck() { return 0; }
43 virtual Script_req *script() { return 0;}
44 virtual Span_req *span() { return 0; }
45 virtual Spacing_req * spacing() { return 0; }
46 virtual Blank_req * blank() { return 0; }
47 virtual Musical_req *musical() { return 0; }
48 virtual Command_req * command() { return 0; }
49 bool equal_b(Request*) const;
51 virtual bool do_equal_b(Request*) const;
52 virtual void do_print()const;
55 #define REQUESTMETHODS(T,accessor) \
56 virtual T * accessor() { 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 */
66 class Script_req : public virtual Request {
69 General_script_def *scriptdef_p_;
72 bool do_equal_b(Request*)const;
75 REQUESTMETHODS(Script_req,script);
77 Script_req(Script_req const&);