summaryrefslogtreecommitdiff
path: root/lily/time-signature.cc
blob: 2df4423e79c0b1aeda771849a84a1f332fce29b6 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*   
  time-signature.cc --  implement Time_signature
  
  source file of the GNU LilyPond music typesetter
  
  (c) 1996--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
  
 */

#include "scalar.hh"
#include "molecule.hh"
#include "time-signature.hh"
#include "paper-def.hh"
#include "lookup.hh"

Time_signature::Time_signature ()
{
  breakable_b_ = true;
}

Molecule*
Time_signature::do_brew_molecule_p () const
{
  if (time_sig_type_str_.length_i ())
    {
      if (time_sig_type_str_[0]=='1')
	{
	  Array<int> tmparr = args_;
	  return new Molecule( lookup_l ()->time_signature (args_[0], 0));
	}
      else
	{
	  return new Molecule( lookup_l ()-> special_time_signature (time_sig_type_str_ ,args_[0], args_[1]));
	}
    }
  else
    return new Molecule(lookup_l ()->time_signature (args_[0], args_[1]));
}