From bb6fd8cc6fef1cc69faef6d375620cc88e292e97 Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:32:10 +0000 Subject: [PATCH] lilypond-0.0.32 --- src/localkeyreg.cc | 25 ++++-------- src/request.cc | 98 ++++++++++++---------------------------------- 2 files changed, 33 insertions(+), 90 deletions(-) diff --git a/src/localkeyreg.cc b/src/localkeyreg.cc index bbd4993022..5669109786 100644 --- a/src/localkeyreg.cc +++ b/src/localkeyreg.cc @@ -3,7 +3,7 @@ (c) 1997 Han-Wen Nienhuys */ - +#include "musicalrequest.hh" #include "localkeyreg.hh" #include "localkeyitem.hh" #include "complexwalker.hh" @@ -13,17 +13,7 @@ Local_key_register::Local_key_register(Complex_walker*w) { key_item_p_ = 0; } -bool -Local_key_register::try_request(Request*) - -{ - return false; -} -void -Local_key_register::process_request() -{ -} void Local_key_register::do_pre_move_process() { @@ -38,21 +28,20 @@ Local_key_register::acknowledge_element(Staff_elem_info info) if (info.req_l_->melodic()) { Melodic_req * melodic_l_ = info.req_l_->melodic(); - if( melodic_l_->forceacc || - walk_l_->local_key_.oct(melodic_l_->octave).acc(melodic_l_->notename) - != melodic_l_->accidental) { + if( melodic_l_->forceacc_b_ || + local_key_.oct(melodic_l_->octave_i_).acc(melodic_l_->notename_i_) + != melodic_l_->accidental_i_) { Item * support_l_ = info.elem_p_->item(); if (!key_item_p_) { - key_item_p_ = new Local_key_item(walk_l_->clef_.c0_position_i_); - key_item_p_->c0_position = walk_l_->clef_.c0_position_i_; + key_item_p_ = new Local_key_item(walk_l_->c0_position_i()); } key_item_p_->add(melodic_l_); key_item_p_->add(support_l_); - walk_l_->local_key_.oct(melodic_l_->octave) - .set(melodic_l_->notename, melodic_l_->accidental); + local_key_.oct(melodic_l_->octave_i_) + .set(melodic_l_->notename_i_, melodic_l_->accidental_i_); } } } diff --git a/src/request.cc b/src/request.cc index 951a509bc4..72b8a3544a 100644 --- a/src/request.cc +++ b/src/request.cc @@ -1,11 +1,17 @@ -#include "request.hh" +/* + request.cc -- implement all musical requests. + + source file of the LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ + +#include "musicalrequest.hh" #include "misc.hh" #include "debug.hh" #include "scriptdef.hh" #include "textdef.hh" -#include "inputcommand.hh" - void Stem_req::do_print() const { @@ -19,20 +25,14 @@ Stem_req::Stem_req(int s, int d) dir_i_ = 0; } -/* *************** */ -void -Barcheck_req::do_print() const -{ -#ifndef NPRINT - -#endif -} +/* ************** */ +void Musical_req::do_print()const{} +void Request::do_print() const{} /* *************** */ void Request::print() const - { mtor << name() << " {"; do_print(); @@ -40,12 +40,6 @@ Request::print() const } -void -Request::do_print() const -{ -#ifndef NPRINT -#endif -} void Span_req::do_print() const @@ -58,12 +52,12 @@ Span_req::do_print() const Request::Request() { elt_l_ = 0; - defined_ch_c_l_m = 0; + defined_ch_c_l_ = 0; } Request::Request(Request const&src) { elt_l_ = 0; - defined_ch_c_l_m = src.defined_ch_c_l_m; + defined_ch_c_l_ = src.defined_ch_c_l_; } /* *************** */ Spacing_req::Spacing_req() @@ -85,22 +79,22 @@ Blank_req::do_print()const /* *************** */ Melodic_req::Melodic_req() { - notename = 0; - octave = 0; - accidental = 0; - forceacc = false; + notename_i_ = 0; + octave_i_ = 0; + accidental_i_ = 0; + forceacc_b_ = false; } void Melodic_req::do_print() const { - mtor << "notename: " << notename << " oct: "<< octave; + mtor << "notename: " << notename_i_ << " oct: "<< octave_i_; } int Melodic_req::height() const { - return notename + octave*7; + return notename_i_ + octave_i_*7; } /* *************** */ @@ -188,25 +182,7 @@ Span_req::Span_req() { spantype = NOSPAN; } -/* *************** */ -void -Group_feature_req::do_print() const -{ - mtor << "stemdir " << stemdir_i_; -} -Group_feature_req::Group_feature_req() -{ - stemdir_i_ = 0; -} -void -Group_change_req::do_print()const -{ - mtor << "id : " << newgroup_str_; -} -void -Terminate_voice_req::do_print()const -{ -} + /* *************** */ Script_req::Script_req(int d , Script_def*def) { @@ -273,39 +249,17 @@ Text_req::do_print() const tdef_p_->print(); } - - /* *************** */ -Mark_req::Mark_req(String s) +Moment +Skip_req::duration() const { - mark_str_ = s; + return duration_; } void -Mark_req::do_print()const -{ -#ifndef NDEBUG - mtor<< " `" << 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::do_print()const +Skip_req::do_print() const { - com_p_->print(); + mtor << "duration: " << duration(); } - -- 2.39.5