X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Frequest.hh;h=b612cb76fbc75f544ed86a0793e56a4962b5f924;hb=d9b43b93f2c885409bafdb157138158f65cc49aa;hp=a349f5786b859bf4e36717d1ecddf0608607d156;hpb=6bc0a8a090e82c4bce57df8e980b48cc78cb422b;p=lilypond.git diff --git a/lily/include/request.hh b/lily/include/request.hh index a349f5786b..b612cb76fb 100644 --- a/lily/include/request.hh +++ b/lily/include/request.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--2002 Han-Wen Nienhuys */ #ifndef REQUEST_HH @@ -17,65 +17,60 @@ #include "music.hh" #include "direction.hh" -/** - a voice element wants something printed. - Hungarian postfix: req - @see lilygut manpage + +/** An atom of musical information. This is an abstract class for any + piece of music that does not contain other Music. + + Hungarian postfix: req + */ class Request : public Music { - public: - - /* *************** */ - - virtual ~Request(){} - - DECLARE_MY_RUNTIME_TYPEINFO; - VIRTUAL_COPY_CONS(Request,Music); - - virtual MInterval time_int() const; - virtual Moment duration() const { return 0; } - - /* accessors for children - maybe checkout RTTI - */ - virtual Barcheck_req *barcheck() { return 0; } - virtual Script_req *script() { return 0;} - virtual Span_req *span() { return 0; } - virtual Spacing_req * spacing() { return 0; } - virtual Blank_req * blank() { return 0; } - virtual Musical_req *musical() { return 0; } - virtual Command_req * command() { return 0; } - bool equal_b (Request*) const; + Request (); + VIRTUAL_COPY_CONS (Music); + bool equal_b (Request const*) const; protected: - virtual bool do_equal_b (Request*) const; - virtual void do_print() const; + virtual bool do_equal_b (Request const*) const; + }; -#define REQUESTMETHODS(T,accessor) \ -virtual T * accessor() { return this;}\ -DECLARE_MY_RUNTIME_TYPEINFO;\ -VIRTUAL_COPY_CONS(T, Request);\ -virtual void do_print() const +class Script_req : public virtual Request +{ +public: + void set_direction (Direction d); + Direction get_direction () const; + VIRTUAL_COPY_CONS (Music); + Script_req (); +}; + -/** Put a script above or below this ``note'' or bar. eg upbow, downbow. Why - a request? These symbols may conflict with slurs and brackets, so - this also a request */ -class Script_req : public virtual Request { +/** + Requests to start or stop something. + This type of request typically results in the creation of a #Spanner# +*/ +class Span_req : public virtual Request { public: - Direction dir_; - General_script_def *scriptdef_p_; + String get_span_type_str () const; + void set_span_type_str (String); + void set_span_dir (Direction d); + Direction get_span_dir () const; + + Span_req (); +protected: + + virtual bool do_equal_b (Request const*) const; - /* *************** */ - bool do_equal_b (Request*) const; + VIRTUAL_COPY_CONS (Music); +}; - Script_req(); - REQUESTMETHODS(Script_req,script); - ~Script_req(); - Script_req (Script_req const&); +/** + Start a tie at this note, end it at the next + */ +class Tie_req : public Request { +public: + VIRTUAL_COPY_CONS (Music); }; - #endif