]> git.donarmstrong.com Git - lilypond.git/blob - lily/ps-def.cc
f0aa1e18ff9f03ab224d60d8a5bc00ae63afb1b6
[lilypond.git] / lily / ps-def.cc
1 /*
2   ps-def.cc -- implement Ps_def
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
7 */
8
9 #include "assoc.hh"
10 #include "assoc-iter.hh"
11 #include "identifier.hh"
12 #include "ps-def.hh"
13 #include "ps-lookup.hh"
14 #include "ps-score.hh"
15 #include "scope.hh"
16
17 IMPLEMENT_IS_TYPE_B1 (Ps_def, Paper_def);
18
19 Lookup*
20 Ps_def::lookup_p (Lookup const& l) const
21 {
22   return new Ps_lookup (l);
23 }
24
25 Lookup*
26 Ps_def::lookup_p (Symtables const& s) const
27 {
28   return new Ps_lookup (s);
29 }
30
31 String
32 Ps_def::output_settings_str () const
33 {
34   String s ("\n ");
35   for (Assoc_iter<String,Identifier*> i (*scope_p_); i.ok (); i++)
36     s += String ("/mudelapaper") + i.key ()
37       + "{" + i.val ()->str () + "} bind def\n";
38   s +=  *scope_p_->elem ("pssetting")->access_String ();
39   return s;
40 }
41
42 Paper_score*
43 Ps_def::paper_score_p () const
44 {
45   return new Ps_score ();
46 }
47  
48 String
49 Ps_def::unknown_str () const
50 {
51   return "unknown ";
52 }
53