LibMusicXML  3.18
lpsrPapers.h
1 /*
2  MusicXML Library
3  Copyright (C) Grame 2006-2013
4 
5  This Source Code Form is subject to the terms of the Mozilla Public
6  License, v. 2.0. If a copy of the MPL was not distributed with this
7  file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9  Grame Research Laboratory, 11, cours de Verdun Gensoul 69002 Lyon - France
10  research@grame.fr
11 */
12 
13 #ifndef ___lpsrPapers___
14 #define ___lpsrPapers___
15 
16 #include <string>
17 #include <iostream>
18 
19 #include "msrScaling.h"
20 
21 #include "lpsrElements.h"
22 
23 #include "messagesHandling.h"
24 
25 
26 using namespace std;
27 
28 namespace MusicXML2
29 {
30 
31 //______________________________________________________________________________
32 class lpsrPaper : public lpsrElement
33 {
34  public:
35 
36  // creation from MusicXML
37  // ------------------------------------------------------
38 
39  static SMARTP<lpsrPaper> create (
40  int inputLineNumber,
41  S_msrScaling scaling,
42  S_msrPageLayout pageLayout);
43 
44  SMARTP<lpsrPaper> createPaperNewbornClone ();
45 
46  protected:
47 
48  // constructors/destructor
49  // ------------------------------------------------------
50 
51  lpsrPaper (
52  int inputLineNumber,
53  S_msrScaling scaling,
54  S_msrPageLayout pageLayout);
55 
56  virtual ~lpsrPaper ();
57 
58  public:
59 
60  // set and get
61  // ------------------------------------------------------
62 
63  // LPSR scaling
64  void setScaling (S_msrScaling value)
65  { fScaling = value; }
66  S_msrScaling getScaling () const
67  { return fScaling; }
68 
69  // MSR page layout
70  void setPageLayout (S_msrPageLayout value)
71  { fPageLayout = value; }
72  S_msrPageLayout getPageLayout () const
73  { return fPageLayout; }
74 
75  // indents
76  void setHorizontalShift (S_msrLength value)
77  { fHorizontalShift = value; }
78  S_msrLength getHorizontalShift () const
79  { return fHorizontalShift; }
80 
81  void setIndent (S_msrLength value)
82  { fIndent = value; }
83  S_msrLength getIndent () const
84  { return fIndent; }
85 
86  void setShortIndent (S_msrLength value)
87  { fShortIndent = value; }
88  S_msrLength getShortIndent () const
89  { return fShortIndent; }
90 
91  // counts
92  void setPageCount (int value)
93  { fPageCount = value; }
94  int getPageCount () const
95  { return fPageCount; }
96 
97  void setSystemCount (int value)
98  { fSystemCount = value; }
99  int getSystemCount () const
100  { return fSystemCount; }
101 
102  // spaces
103  void setMarkupSystemSpacingPadding (S_msrLength val)
104  { fMarkupSystemSpacingPadding = val; }
105  S_msrLength getMarkupSystemSpacingPadding () const
106  { return fMarkupSystemSpacingPadding; }
107 
108  void setBetweenSystemSpace (S_msrLength val)
109  { fBetweenSystemSpace = val; }
110  S_msrLength getBetweenSystemSpace () const
111  { return fBetweenSystemSpace; }
112 
113  void setPageTopSpace (S_msrLength val)
114  { fPageTopSpace = val; }
115  S_msrLength getPageTopSpace () const
116  { return fPageTopSpace; }
117 
118 
119  // headers and footers
120  void setOddHeaderMarkup (string value)
121  { fOddHeaderMarkup = value; }
122  string getOddHeaderMarkup () const
123  { return fOddHeaderMarkup; }
124 
125  void setEvenHeaderMarkup (string value)
126  { fEvenHeaderMarkup = value; }
127  string getEvenHeaderMarkup () const
128  { return fEvenHeaderMarkup; }
129 
130  void setOddFooterMarkup (string value)
131  { fOddFooterMarkup = value; }
132  string getOddFooterMarkup () const
133  { return fOddFooterMarkup; }
134 
135  void setEvenFooterMarkup (string value)
136  { fEvenFooterMarkup = value; }
137  string getEvenFooterMarkup () const
138  { return fEvenFooterMarkup; }
139 
140  // services
141  // ------------------------------------------------------
142 
143  public:
144 
145  // visitors
146  // ------------------------------------------------------
147 
148  virtual void acceptIn (basevisitor* v);
149  virtual void acceptOut (basevisitor* v);
150 
151  virtual void browseData (basevisitor* v);
152 
153  public:
154 
155  // print
156  // ------------------------------------------------------
157 
158  virtual void print (ostream& os) const;
159 
160 
161  private:
162 
163  // fields
164  // ------------------------------------------------------
165 
166  // MSR scaling
167  S_msrScaling fScaling;
168 
169  // MSR page layout
170  S_msrPageLayout fPageLayout;
171 
172  // indents
173  S_msrLength fHorizontalShift;
174  S_msrLength fIndent;
175  S_msrLength fShortIndent;
176 
177  // spaces
178  S_msrLength fMarkupSystemSpacingPadding;
179  S_msrLength fBetweenSystemSpace;
180  S_msrLength fPageTopSpace;
181 
182  // counts
183  int fPageCount;
184  int fSystemCount;
185 
186  // headers and footers
187  string fOddHeaderMarkup;
188  string fEvenHeaderMarkup;
189  string fOddFooterMarkup;
190  string fEvenFooterMarkup;
191 };
193 EXP ostream& operator<< (ostream& os, const S_lpsrPaper& elt);
194 
195 
196 }
197 
198 
199 #endif
MusicXML2::lpsrElement
Definition: lpsrElements.h:24
MusicXML2::SMARTP< lpsrPaper >
MusicXML2::basevisitor
Definition: basevisitor.h:25
MusicXML2::lpsrPaper
Definition: lpsrPapers.h:33