LibMusicXML  3.18
musicXMLOah.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 ___musicXMLOah___
14 #define ___musicXMLOah___
15 
16 #include "oahBasicTypes.h"
17 #include "exports.h"
18 
19 
20 namespace MusicXML2
21 {
22 
23 //______________________________________________________________________________
24 class musicXMLOah : public oahGroup
25 {
26  public:
27 
28  // creation
29  // ------------------------------------------------------
30 
31  static SMARTP<musicXMLOah> create (
32  S_oahHandler handlerUpLink);
33 
34  SMARTP<musicXMLOah> createCloneWithDetailedTrace ();
35 
36  private:
37 
38  // initialisation
39  // ------------------------------------------------------
40 
41  void initializeMusicXMLOah (
42  bool boolOptionsInitialValue);
43 
44  protected:
45 
46  // constructors/destructor
47  // ------------------------------------------------------
48 
49  musicXMLOah (
50  S_oahHandler handlerUpLink);
51 
52  virtual ~musicXMLOah ();
53 
54  public:
55 
56  // quiet mode
57  // ------------------------------------------------------
58 
59  void enforceQuietness ();
60 
61  public:
62 
63  // consistency check
64  // ------------------------------------------------------
65 
66  virtual void checkOptionsConsistency ();
67 
68  public:
69 
70  // set and get
71  // ------------------------------------------------------
72 
73  void setAllMusicXMLTraceOah (
74  bool boolOptionsInitialValue);
75 
76  public:
77 
78  // public services
79  // ------------------------------------------------------
80 
81  private:
82 
83  // private services
84  // ------------------------------------------------------
85 
86 #ifdef TRACE_OAH
87  void initializeMusicXMLTraceOah (
88  bool boolOptionsInitialValue);
89 #endif
90 
91  void initializeMusicXMLHeaderOptions (
92  bool boolOptionsInitialValue);
93 
94  void initializeMusicXMLClefsKeysTimesOptions (
95  bool boolOptionsInitialValue);
96 
97  void initializeMusicXMMeasuresOptions (
98  bool boolOptionsInitialValue);
99 
100  void initializeMusicXMLDynamicsAndWedgesOptions (
101  bool boolOptionsInitialValue);
102 
103  void initializeMusicXMLCombinedOptionsOptions (
104  bool boolOptionsInitialValue);
105 
106  void initializeMusicXMLLoopOptions (
107  bool boolOptionsInitialValue);
108 
109  public:
110 
111  // visitors
112  // ------------------------------------------------------
113 
114  virtual void acceptIn (basevisitor* v);
115  virtual void acceptOut (basevisitor* v);
116 
117  virtual void browseData (basevisitor* v);
118 
119  public:
120 
121  // print
122  // ------------------------------------------------------
123 
124  void printMusicXMLOahHelp ();
125 
126  void printMusicXMLOahValues (int fieldWidth);
127 
128  public:
129 
130  // fields
131  // ------------------------------------------------------
132 
133  // header
134  // --------------------------------------
135 
136  bool fUseFilenameAsWorkTitle;
137 
138  bool fUseLyricistsAsPoets; // lyricist is unknown to LilyPond
139 
140  // clefs, keys, times
141  // --------------------------------------
142 
143  bool fIgnoreRedundantClefs;
144  bool fIgnoreRedundantKeys;
145  bool fIgnoreRedundantTimes;
146 
147  S_oahBooleanAtom fIgnoreRedundantClefsAtom;
148  S_oahBooleanAtom fIgnoreRedundantKeysAtom;
149  S_oahBooleanAtom fIgnoreRedundantTimesAtom;
150 
151  // measures
152  // --------------------------------------
153 
154  map<string,int> fAddEmptyMeasuresStringToIntMap;
155 
156  // dynamics and wedges
157  // --------------------------------------
158 
159  bool fAllDynamicsBelow;
160  bool fAllWedgesBelow;
161 
162  // combined options, cubase
163  // --------------------------------------
164 
165  bool fCubase; // JMI ???
166  bool fNoCubase;
167 
168  // loop to do JMI
169  // --------------------------------------
170  bool fLoopToMusicXML;
171 
172 #ifdef TRACE_OAH
173  // specific trace JMI move to traceOah
174  // --------------------------------------
175 
176  // visitors
177  bool fTraceMusicXMLTreeVisitors;
178 
179  // encoding
180  bool fTraceEncoding;
181 
182  // divisions
183  bool fTraceDivisions;
184 
185  // backup
186  bool fTraceBackup;
187 
188  // forward
189  bool fTraceForward;
190 #endif
191 };
193 EXP ostream& operator<< (ostream& os, const S_musicXMLOah& elt);
194 
195 EXP extern S_musicXMLOah gMusicXMLOah;
196 EXP extern S_musicXMLOah gMusicXMLOahUserChoices;
197 EXP extern S_musicXMLOah gMusicXMLOahWithDetailedTrace;
198 
199 //______________________________________________________________________________
200 void initializeMusicXMLOahHandling (
201  S_oahHandler handler);
202 
203 
204 }
205 
206 
207 #endif
the smart pointer implementation
Definition: smartpointer.h:58
Definition: basevisitor.h:25
Definition: musicXMLOah.h:25
Definition: oahBasicTypes.h:2854