*/
#include "inputcommands.hh"
+#include "inputcommand.hh"
#include "debug.hh"
#include "staffcommands.hh"
#include "getcommand.hh"
#include "command.hh"
void
-interpret_meter(Command *c, int &beats_per_meas, int& one_beat,
+interpret_meter(Input_command *c, int &beats_per_meas, int& one_beat,
Real& whole_per_measure)
{
beats_per_meas = c->args[1].value();
last=0;
}
-Input_cursor :: Input_cursor(PCursor<Command*>c)
- :PCursor<Command*>(c)
+Input_cursor :: Input_cursor(PCursor<Input_command*>c)
+ :PCursor<Input_command*>(c)
{
reset();
}
Input_cursor::operator++(int)
{
last = when();
- (*(PCursor<Command*> *) this) ++;
+ (*(PCursor<Input_command*> *) this) ++;
if (ok()) {
sync();
- if (ptr()->code == INTERPRET && ptr()->args[0] == "METER") {
+ if (ptr()->args[0] == "METER") {
int i,j;
interpret_meter(ptr(), i, j, whole_per_measure);
}
}
void
-Input_cursor::addbot(Command*c)
+Input_cursor::addbot(Input_command*c)
{
assert(!ok());
add(c);
void
-Input_cursor::add(Command*c)
+Input_cursor::add(Input_command*c)
{
- PCursor<Command*> ::add(c);
+ PCursor<Input_command*> ::add(c);
(*this)++;
}
Input_cursor::last_command_here()
{
assert(ok());
- PCursor<Command*> next = (*this)+1;
+ PCursor<Input_command*> next = (*this)+1;
while (next.ok() && next->when == when()){
*this = next;
next = *this +1;