LibMusicXML  3.18
lpsrHeaders.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 ___lpsrHeaders___
14 #define ___lpsrHeaders___
15 
16 #include "lpsrVarValAssocs.h"
17 
18 #include "lilypondOah.h"
19 
20 
21 namespace MusicXML2
22 {
23 
24 //______________________________________________________________________________
25 class lpsrHeader : public lpsrElement
26 {
27  public:
28 
29  // creation from MusicXML
30  // ------------------------------------------------------
31 
32  static SMARTP<lpsrHeader> create (
33  int inputLineNumber);
34 
35  protected:
36 
37  // constructors/destructor
38  // ------------------------------------------------------
39 
40  lpsrHeader (
41  int inputLineNumber);
42 
43  virtual ~lpsrHeader ();
44 
45  public:
46 
47  // set and get
48  // ------------------------------------------------------
49 
50  // MusicXML informations
51 
52  void setWorkNumber (
53  int inputLineNumber,
54  string val,
55  msrFontStyleKind fontStyleKind,
56  msrFontWeightKind fontWeightKind);
57 
58  S_lpsrVarValAssoc getWorkNumber () const
59  { return fWorkNumber; }
60 
61  void setWorkTitle (
62  int inputLineNumber,
63  string val,
64  msrFontStyleKind fontStyleKind,
65  msrFontWeightKind fontWeightKind);
66 
67  S_lpsrVarValAssoc getWorkTitle () const
68  { return fWorkTitle; }
69 
70  void setMovementNumber (
71  int inputLineNumber,
72  string val,
73  msrFontStyleKind fontStyleKind,
74  msrFontWeightKind fontWeightKind);
75 
76  S_lpsrVarValAssoc getMovementNumber () const
77  { return fMovementNumber; }
78 
79  void setMovementTitle (
80  int inputLineNumber,
81  string val,
82  msrFontStyleKind fontStyleKind,
83  msrFontWeightKind fontWeightKind);
84 
85  S_lpsrVarValAssoc getMovementTitle () const
86  { return fMovementTitle; }
87 
88  void setEncodingDate (
89  int inputLineNumber,
90  string val,
91  msrFontStyleKind fontStyleKind,
92  msrFontWeightKind fontWeightKind);
93 
94  S_lpsrVarValAssoc getEncodingDate () const
95  { return fEncodingDate; }
96 
97  void setScoreInstrument (
98  int inputLineNumber,
99  string val,
100  msrFontStyleKind fontStyleKind,
101  msrFontWeightKind fontWeightKind);
102 
103  S_lpsrVarValAssoc getScoreInstrument () const
104  { return fScoreInstrument; }
105 
106  void setMiscellaneousField (
107  int inputLineNumber,
108  string val,
109  msrFontStyleKind fontStyleKind,
110  msrFontWeightKind fontWeightKind);
111 
112  S_lpsrVarValAssoc getMiscellaneousField () const
113  { return fMiscellaneousField; }
114 
115  void setComposers (
116  int inputLineNumber,
117  string val,
118  msrFontStyleKind fontStyleKind,
119  msrFontWeightKind fontWeightKind);
120 
122  getComposers () const
123  { return fComposers; }
124 
125  void setArrangers (
126  int inputLineNumber,
127  string val,
128  msrFontStyleKind fontStyleKind,
129  msrFontWeightKind fontWeightKind);
130 
132  getArrangers () const
133  { return fArrangers; }
134 
135  void setLyricists (
136  int inputLineNumber,
137  string val,
138  msrFontStyleKind fontStyleKind,
139  msrFontWeightKind fontWeightKind);
140 
142  getLyricists () const
143  { return fLyricists; }
144 
145  void setPoets (
146  int inputLineNumber,
147  string val,
148  msrFontStyleKind fontStyleKind,
149  msrFontWeightKind fontWeightKind);
150 
152  getPoets () const
153  { return fPoets; }
154 
155  void setTranslators (
156  int inputLineNumber,
157  string val,
158  msrFontStyleKind fontStyleKind,
159  msrFontWeightKind fontWeightKind);
160 
162  getTranslators () const
163  { return fTranslators; }
164 
165  void setRights (
166  int inputLineNumber,
167  string val,
168  msrFontStyleKind fontStyleKind,
169  msrFontWeightKind fontWeightKind);
170 
172  getRights () const
173  { return fRights; }
174 
175  void setSoftwares (
176  int inputLineNumber,
177  string val,
178  msrFontStyleKind fontStyleKind,
179  msrFontWeightKind fontWeightKind);
180 
182  getSoftwares () const
183  { return fSoftwares; }
184 
185  // LilyPond informations
186 
187  // centered
188 
189  void setLilypondDedication (
190  int inputLineNumber,
191  string val,
192  msrFontStyleKind fontStyleKind,
193  msrFontWeightKind fontWeightKind);
194 
195  S_lpsrVarValAssoc getLilypondDedication () const
196  { return fLilypondDedication; }
197 
198  void setLilypondPiece (
199  int inputLineNumber,
200  string val,
201  msrFontStyleKind fontStyleKind,
202  msrFontWeightKind fontWeightKind);
203 
204  S_lpsrVarValAssoc getLilypondPiece () const
205  { return fLilypondPiece; }
206 
207  void setLilypondOpus (
208  int inputLineNumber,
209  string val,
210  msrFontStyleKind fontStyleKind,
211  msrFontWeightKind fontWeightKind);
212 
213  S_lpsrVarValAssoc getLilypondOpus () const
214  { return fLilypondOpus; }
215 
216  void setLilypondTitle (
217  int inputLineNumber,
218  string val,
219  msrFontStyleKind fontStyleKind,
220  msrFontWeightKind fontWeightKind);
221 
222  S_lpsrVarValAssoc getLilypondTitle () const
223  { return fLilypondTitle; }
224 
225  void setLilypondSubTitle (
226  int inputLineNumber,
227  string val,
228  msrFontStyleKind fontStyleKind,
229  msrFontWeightKind fontWeightKind);
230 
231  S_lpsrVarValAssoc getLilypondSubTitle () const
232  { return fLilypondSubTitle; }
233 
234  void setLilypondSubSubTitle (
235  int inputLineNumber,
236  string val,
237  msrFontStyleKind fontStyleKind,
238  msrFontWeightKind fontWeightKind);
239 
240  S_lpsrVarValAssoc getLilypondSubSubTitle () const
241  { return fLilypondSubSubTitle; }
242 
243  // evenly spread on one line
244  // "instrument" also appears on following pages
245 
246  void setLilypondInstrument (
247  int inputLineNumber,
248  string val,
249  msrFontStyleKind fontStyleKind,
250  msrFontWeightKind fontWeightKind);
251 
252  S_lpsrVarValAssoc getLilypondInstrument () const
253  { return fLilypondInstrument; }
254 
255  // at opposite ends of the same line
256 
257  void setLilypondMeter (
258  int inputLineNumber,
259  string val,
260  msrFontStyleKind fontStyleKind,
261  msrFontWeightKind fontWeightKind);
262 
263  S_lpsrVarValAssoc getLilypondMeter () const
264  { return fLilypondMeter; }
265 
266  // centered at the bottom of the first page
267 
268  void setLilypondCopyright (
269  int inputLineNumber,
270  string val,
271  msrFontStyleKind fontStyleKind,
272  msrFontWeightKind fontWeightKind);
273 
274  S_lpsrVarValAssoc getLilypondCopyright () const
275  { return fLilypondCopyright; }
276 
277  // centered at the bottom of the last page
278 
279  void setLilypondTagline (
280  int inputLineNumber,
281  string val,
282  msrFontStyleKind fontStyleKind,
283  msrFontWeightKind fontWeightKind);
284 
285  S_lpsrVarValAssoc getLilypondTagline () const
286  { return fLilypondTagline; }
287 
288  public:
289 
290  // public services
291  // ------------------------------------------------------
292 
293  public:
294 
295  void addRights (
296  int inputLineNumber,
297  string value);
298 
299  void addComposer (
300  int inputLineNumber,
301  string value);
302 
303  void addArranger (
304  int inputLineNumber,
305  string value);
306 
307  void addLyricist (
308  int inputLineNumber,
309  string value);
310 
311  void addPoet (
312  int inputLineNumber,
313  string value);
314 
315  void addTranslator (
316  int inputLineNumber,
317  string value);
318 
319  void addArtist (
320  int inputLineNumber,
321  string value);
322 
323  void addSoftware (
324  int inputLineNumber,
325  string value);
326 
327  int maxLilypondVariablesNamesLength ();
328 
329  public:
330 
331  // visitors
332  // ------------------------------------------------------
333 
334  virtual void acceptIn (basevisitor* v);
335  virtual void acceptOut (basevisitor* v);
336 
337  virtual void browseData (basevisitor* v);
338 
339  public:
340 
341  // print
342  // ------------------------------------------------------
343 
344  virtual void print (ostream& os) const;
345 
346  private:
347 
348  // fields
349  // ------------------------------------------------------
350 
351  // MusicXML informations
352 
353  S_lpsrVarValAssoc fWorkNumber;
354  S_lpsrVarValAssoc fWorkTitle;
355  S_lpsrVarValAssoc fMovementNumber;
356  S_lpsrVarValAssoc fMovementTitle;
357 
359  fRights;
360 
362  fComposers;
364  fArrangers;
366  fLyricists;
368  fPoets;
370  fTranslators;
372  fArtists;
373 
375  fSoftwares;
376 
377  S_lpsrVarValAssoc fEncodingDate;
378 
379  S_lpsrVarValAssoc fScoreInstrument;
380 
381  S_lpsrVarValAssoc fMiscellaneousField;
382 
383  // Lilypond informations
384 
385  // centered
386  S_lpsrVarValAssoc fLilypondDedication;
387 
388  S_lpsrVarValAssoc fLilypondPiece;
389  S_lpsrVarValAssoc fLilypondOpus;
390 
391  S_lpsrVarValAssoc fLilypondTitle;
392  S_lpsrVarValAssoc fLilypondSubTitle;
393  S_lpsrVarValAssoc fLilypondSubSubTitle;
394 
395  // evenly spread on one line
396  // "instrument" also appears on following pages
397  S_lpsrVarValAssoc fLilypondInstrument;
398 
399  // at opposite ends of the same line
400  S_lpsrVarValAssoc fLilypondMeter;
401 
402  // centered at the bottom of the first page
403  S_lpsrVarValAssoc fLilypondCopyright;
404 
405  // centered at the bottom of the last page
406  S_lpsrVarValAssoc fLilypondTagline;
407 };
409 EXP ostream& operator<< (ostream& os, const S_lpsrHeader& elt);
410 
411 
412 }
413 
414 
415 #endif
MusicXML2::lpsrElement
Definition: lpsrElements.h:24
MusicXML2::SMARTP< lpsrHeader >
MusicXML2::basevisitor
Definition: basevisitor.h:25
MusicXML2::lpsrHeader
Definition: lpsrHeaders.h:26