lilypond-0.0.5
[lilypond.git] / command.cc
blob6375c7e6d3101fe915d9baf93ff3b068ebef8403
1 #include "string.hh"
2 #include "debug.hh"
3 #include "command.hh"
5 bool
6 Command::isbreak()const
8 return (code >= BREAK_PRE&&code <= BREAK_END);
11 Command*
12 get_bar_command(Real w)
14 Command*c = new Command;
15 c->when = w;
16 c->code = TYPESET;
17 c->args.add( "BAR");
18 c->args.add( "|");
19 return c;
22 Command *
23 get_meter_command(Real w, int n, int m)
25 Command*c = new Command;
27 c->when = w;
28 c->code = TYPESET;
29 c->args.add( "METER");
30 c->args.add( n );
31 c->args.add( m );
32 return c;
37 Command::Command()
39 code = NOP;
40 when = -1;
45 Command::Command(Real w)
47 code = NOP;
48 when = w;
50 void
51 Command::print() const
53 mtor << "command code: " << code << " args: ";
54 for (int i = 0; i<args.sz(); i++)
55 mtor << args[i];
56 mtor << "\n";