based on note-heads-engraver.cc, by Jean-Baptiste Lamy <jiba@tuxfamily.org>,
- (c) 2002--2005
+ (c) 2002--2006
*/
#include <cctype>
#include <cstdio>
+using namespace std;
#include "rhythmic-head.hh"
#include "output-def.hh"
*/
class Tab_note_heads_engraver : public Engraver
{
- Link_array<Item> notes_;
+ vector<Item*> notes_;
- Link_array<Item> dots_;
- Link_array<Music> note_events_;
- Link_array<Music> tabstring_events_;
+ vector<Item*> dots_;
+ vector<Music*> note_events_;
+ vector<Music*> tabstring_events_;
public:
TRANSLATOR_DECLARATIONS (Tab_note_heads_engraver);
{
if (m->is_mus_type ("note-event"))
{
- note_events_.push (m);
+ note_events_.push_back (m);
return true;
}
else if (m->is_mus_type ("string-number-event"))
{
- tabstring_events_.push (m);
+ tabstring_events_.push_back (m);
return true;
}
else if (m->is_mus_type ("busy-playing-event"))
- {
- return note_events_.size ();
- }
+ return note_events_.size ();
return false;
}
void
Tab_note_heads_engraver::process_music ()
{
- int j = 0;
- for (int i = 0; i < note_events_.size (); i++)
+ vsize j = 0;
+ for (vsize i = 0; i < note_events_.size (); i++)
{
SCM stringTunings = get_property ("stringTunings");
int number_of_strings = ((int) ly_length (stringTunings));
if (!tabstring_event && j < tabstring_events_.size ())
{
tabstring_event = tabstring_events_[j];
- if (j +1 < tabstring_events_.size ())
+ if (j + 1 < tabstring_events_.size ())
j++;
}
d->set_parent (note, Y_AXIS);
- dots_.push (d);
+ dots_.push_back (d);
}
SCM scm_pitch = event->get_property ("pitch");
note->set_property ("text", text);
note->set_property ("staff-position", scm_from_int (pos));
- notes_.push (note);
+ notes_.push_back (note);
}
}