diff options
Diffstat (limited to 'command.cc')
-rw-r--r-- | command.cc | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/command.cc b/command.cc index ebf993d239..6375c7e6d3 100644 --- a/command.cc +++ b/command.cc @@ -1,7 +1,12 @@ - #include "string.hh" +#include "debug.hh" #include "command.hh" +bool +Command::isbreak()const +{ + return (code >= BREAK_PRE&&code <= BREAK_END); +} Command* get_bar_command(Real w) @@ -13,3 +18,40 @@ get_bar_command(Real w) c->args.add( "|"); return c; } + +Command * +get_meter_command(Real w, int n, int m) +{ + Command*c = new Command; + + c->when = w; + c->code = TYPESET; + c->args.add( "METER"); + c->args.add( n ); + c->args.add( m ); + return c; +} + + + +Command::Command() +{ + code = NOP; + when = -1; +} + + + +Command::Command(Real w) +{ + code = NOP; + when = w; +} +void +Command::print() const +{ + mtor << "command code: " << code << " args: "; + for (int i = 0; i<args.sz(); i++) + mtor << args[i]; + mtor << "\n"; +} |