]> git.donarmstrong.com Git - lilypond.git/blob - src/command.cc
94d3bb94d2d59c42e3ff196a3dac9a19aa834875
[lilypond.git] / src / command.cc
1 #include "string.hh"
2 #include "debug.hh"
3 #include "command.hh"
4
5 bool
6 Command::isbreak()const
7 {
8     return (code >= BREAK_PRE && code <= BREAK_END);
9 }
10
11 Command::Command()
12 {
13     code = NOP;
14     when = -1;
15     priority=0;
16 }
17
18 Command::Command(Real w)
19 {
20     code = NOP;
21     when = w;
22     priority=0;
23 }
24
25 void
26 Command::print() const
27 {
28 #ifndef NPRINT
29     mtor << "command at " << when << ", code " << code << " prio " << priority;
30     if ( isbreak())
31         mtor << "(break separator)";
32     if (args.sz()) {
33         mtor<< " args: ";
34         for (int i = 0; i<args.sz(); i++)
35             mtor << "`"<<args[i] <<"',";
36     }
37     mtor << "\n";
38 #endif
39 }