#include "request.hh"
#include "debug.hh"
-IMPLEMENT_STATIC_NAME(Music_iterator);
+
IMPLEMENT_IS_TYPE_B(Music_iterator);
Chord_iterator::~Chord_iterator(){}
Music_iterator * p =0;
if (m->is_type_b( Change_reg::static_name()))
p = new Change_iterator((Change_reg*)m);
- else if (m->is_type_b( Voice_element::static_name()))
- p = new Voice_element_iterator( (Voice_element*) m);
+ else if (m->is_type_b( Request_chord::static_name()))
+ p = new Request_chord_iterator( (Request_chord*) m);
else if (m->is_type_b( Chord::static_name()))
p = new Chord_iterator( (Chord*) m);
else if (m->is_type_b( Voice::static_name()))
// assert(!ok() || next_moment() > until);
}
-IMPLEMENT_STATIC_NAME(Chord_iterator);
+
IMPLEMENT_IS_TYPE_B1(Chord_iterator,Music_iterator);
Moment
delete iter_p_;
}
-IMPLEMENT_STATIC_NAME(Voice_iterator);
+
IMPLEMENT_IS_TYPE_B1(Voice_iterator,Music_iterator);
void
change_l_ = ch;
}
-IMPLEMENT_STATIC_NAME(Change_iterator);
+
IMPLEMENT_IS_TYPE_B1(Change_iterator,Music_iterator);
/*
/* ******************** */
-IMPLEMENT_STATIC_NAME(Voice_element_iterator);
-IMPLEMENT_IS_TYPE_B1(Voice_element_iterator,Music_iterator);
+
+IMPLEMENT_IS_TYPE_B1(Request_chord_iterator,Music_iterator);
void
-Voice_element_iterator::construct_children()
+Request_chord_iterator::construct_children()
{
get_req_translator_l();
}
-Voice_element_iterator::Voice_element_iterator(Voice_element*el_l)
+Request_chord_iterator::Request_chord_iterator(Request_chord*el_l)
{
elt_l_ = el_l;
elt_duration_ = el_l->time_int().length();
bool
-Voice_element_iterator::ok()const
+Request_chord_iterator::ok()const
{
return (elt_duration_ && !last_b_) || first_b_;
}
Moment
-Voice_element_iterator::next_moment()const
+Request_chord_iterator::next_moment()const
{
Moment m(0);
if (!first_b_)
}
void
-Voice_element_iterator::do_print() const
+Request_chord_iterator::do_print() const
{
#ifndef NPRINT
mtor << "duration: " << elt_duration_;
#endif
}
void
-Voice_element_iterator::process_and_next(Moment mom)
+Request_chord_iterator::process_and_next(Moment mom)
{
if ( first_b_ ) {
for (PCursor<Music*> i(elt_l_->music_p_list_); i.ok(); i++) {
add(i->clone());
}
-IMPLEMENT_STATIC_NAME(Music_list);
-IMPLEMENT_STATIC_NAME(Chord);
-IMPLEMENT_STATIC_NAME(Voice);
+
+
+
IMPLEMENT_IS_TYPE_B1(Music_list, Music);
IMPLEMENT_IS_TYPE_B1(Voice,Music_list);
IMPLEMENT_IS_TYPE_B1(Chord,Music_list);
#endif
}
-IMPLEMENT_IS_TYPE_B1(Voice_element, Chord);
-IMPLEMENT_STATIC_NAME(Voice_element);
+IMPLEMENT_IS_TYPE_B1(Request_chord, Chord);
+
-Voice_element::Voice_element()
+Request_chord::Request_chord()
{
multi_level_i_ =0;
}
Chord*
My_lily_parser::get_word_element(Text_def* tdef_p, Duration * duration_p)
{
- Chord* velt_p = new Voice_element;
+ Chord* velt_p = new Request_chord;
Lyric_req* lreq_p = new Lyric_req(tdef_p);
Chord *
My_lily_parser::get_rest_element(String s, Duration * duration_p )
{
- Chord* velt_p = new Voice_element;
+ Chord* velt_p = new Request_chord;
velt_p->set_spot( here_input());
if (s=="s") { /* Space */
Chord *
My_lily_parser::get_note_element(Note_req *rq, Duration * duration_p )
{
- Chord*v = new Voice_element;
+ Chord*v = new Request_chord;
v->set_spot( here_input());
v->add(rq);