From ff4c70faf837126cd7ad1f7ea38c3480bc0b33bf Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:28:30 +0000 Subject: [PATCH] lilypond-0.0.24 --- src/request.cc | 103 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 77 insertions(+), 26 deletions(-) diff --git a/src/request.cc b/src/request.cc index 8cc3bf1495..c6ff787c66 100644 --- a/src/request.cc +++ b/src/request.cc @@ -4,6 +4,8 @@ #include "scriptdef.hh" #include "textdef.hh" +#include "inputcommand.hh" + #define VIRTUALCONS(T,R) R *T::clone() const { return new T(*this); } struct T #define RCONS(T) VIRTUALCONS(T, Request) @@ -11,6 +13,7 @@ RCONS(Rest_req); RCONS(Barcheck_req); RCONS(Text_req); RCONS(Rhythmic_req); +RCONS(Lyric_req); RCONS(Mark_req); RCONS(Stem_req); RCONS(Script_req); @@ -19,11 +22,14 @@ RCONS(Melodic_req); RCONS(Span_req); RCONS(Slur_req); RCONS(Beam_req); +RCONS(Staff_command_req); + void Stem_req::print() const { mtor << "Stem\n"; } +/****************/ void Barcheck_req::print() const { @@ -31,7 +37,7 @@ Barcheck_req::print() const mtor << "Barcheck\n"; #endif } - +/****************/ void Request::print() const { @@ -56,6 +62,7 @@ Request::Request(Request const&) { elt_l_ = 0; } +/****************/ Melodic_req::Melodic_req() { name = 0; @@ -64,12 +71,19 @@ Melodic_req::Melodic_req() forceacc = false; } +void +Melodic_req::print() const +{ + mtor << "note: " << name << " oct: "<< octave; +} + int Melodic_req::height() const { return name + octave*7; } +/****************/ Rhythmic_req::Rhythmic_req() { plet_factor = 1; @@ -88,42 +102,52 @@ Rhythmic_req::print() const mtor<<", plet factor"<align_i_ = 1; // raggedright + dir_i_ = -1; // lyrics below (invisible) staff } +void +Lyric_req::print() const +{ + mtor << "lyric: "; + Rhythmic_req::print(); + Text_req::print(); +} +/****************/ void Note_req::print() const { Melodic_req::print(); Rhythmic_req::print(); } - +/****************/ void Rest_req::print() const { mtor << "rest, " ; Rhythmic_req::print(); } - - -Moment -Rhythmic_req::duration() const { - return wholes(balltype,dots)*plet_factor; -} - +/****************/ Beam_req::Beam_req() { nplet = 0; } - +/****************/ Span_req::Span_req() { spantype = NOSPAN; } - +/****************/ Script_req::Script_req(int d , Script_def*def) { dir = d; @@ -148,30 +172,36 @@ Script_req::~Script_req() { delete scriptdef; } +/****************/ -Text_req::Text_req(Text_req const& s) +Text_req::~Text_req() { - spec = new Text_def(*s.spec); - dir = s.dir; + delete tdef_p_; + tdef_p_ = 0; +} + +Text_req::Text_req(Text_req const& src) +{ + tdef_p_ = new Text_def(*src.tdef_p_); + dir_i_ = src.dir_i_; } -Text_req::Text_req(int d , Text_def*def) + +Text_req::Text_req(int dir_i, Text_def* tdef_p) { - dir = d; - spec = def; + dir_i_ = dir_i; + tdef_p_ = tdef_p; } void Text_req::print() const { - mtor << " dir " << dir ; - spec->print(); + mtor << " dir " << dir_i_ ; + tdef_p_->print(); } -Text_req::~Text_req() -{ - delete spec; -} + +/****************/ Mark_req::Mark_req(String s) { @@ -185,3 +215,24 @@ Mark_req::print()const mtor<< "Mark `" << mark_str_ << "\'\n"; #endif } +/****************/ +Staff_command_req::Staff_command_req(Input_command * p) +{ + com_p_ = p; +} +Staff_command_req::~Staff_command_req() +{ + delete com_p_; +} +Staff_command_req::Staff_command_req(Staff_command_req const&src) +{ + com_p_ = new Input_command(*src.com_p_); +} +void +Staff_command_req::print()const +{ + mtor << "Command request: " ; + com_p_->print(); +} + + -- 2.39.5