LibMusicXML  3.18
traceOah.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 ___traceOah___
14 #define ___traceOah___
15 
16 
17 #include "setTraceOahIfDesired.h"
18 
19 #ifdef TRACE_OAH
20 
21 
22 #include <set>
23 
24 #include "exports.h"
25 
26 #include "oahBasicTypes.h"
27 
28 
29 namespace MusicXML2
30 {
31 
32 //______________________________________________________________________________
33 class traceOah : public oahGroup
34 {
35  public:
36 
37  static SMARTP<traceOah> create (
38  S_oahHandler handlerUpLink);
39 
40  SMARTP<traceOah> createCloneWithTrueValues (); // JMI
41 
42  public:
43 
44  // initialisation
45  // ------------------------------------------------------
46 
47  void initializeTraceOah (
48  bool boolOptionsInitialValue);
49 
50  void initializeOptionsTraceAndDisplayOptions (
51  bool boolOptionsInitialValue);
52 
53  void initializeRepeatsToSlashesTraceOah (
54  bool boolOptionsInitialValue);
55 
56  void initializeNotesTraceOah (
57  bool boolOptionsInitialValue);
58 
59  void initializeNotesAttachmentsTraceOah (
60  bool boolOptionsInitialValue);
61 
62  void initializeScoreToVoicesTraceOah (
63  bool boolOptionsInitialValue);
64 
65  void initializeSegmentsAndMeasuresTraceOah (
66  bool boolOptionsInitialValue);
67 
68  void initializeInstrumentsTraceOah (
69  bool boolOptionsInitialValue);
70 
71  void initializeChordsAndTupletsTraceOah (
72  bool boolOptionsInitialValue);
73 
74  void initializeCreditsToWordsTraceOah (
75  bool boolOptionsInitialValue);
76 
77  void initializeHarmoniesAndFiguredBassesTraceOah (
78  bool boolOptionsInitialValue);
79 
80  void initializeSpannersTraceOah (
81  bool boolOptionsInitialValue);
82 
83  void initializeInterNotesTraceOah (
84  bool boolOptionsInitialValue);
85 
86  void initializeClefsToTemposTraceOah (
87  bool boolOptionsInitialValue);
88 
89  void initializeBreaksAndBarlinesTraceOah (
90  bool boolOptionsInitialValue);
91 
92  void initializeAboveStaffTraceOah (
93  bool boolOptionsInitialValue);
94 
95  void initializeTranspositionsTraceOah (
96  bool boolOptionsInitialValue);
97 
98  void initializeOtherTraceOah (
99  bool boolOptionsInitialValue);
100 
101  protected:
102 
103  // constructors/destructor
104  // ------------------------------------------------------
105 
106  traceOah (
107  S_oahHandler handlerUpLink);
108 
109  virtual ~traceOah ();
110 
111  public:
112 
113  // quiet mode
114  // ------------------------------------------------------
115 
116  void enforceQuietness ();
117 
118  public:
119 
120  // consistency check
121  // ------------------------------------------------------
122 
123  virtual void checkOptionsConsistency ();
124 
125  public:
126 
127  // set and get
128  // ------------------------------------------------------
129 
130  /* JMI
131  void setAllGeneralTraceOah (
132  bool boolOptionsInitialValue);
133  */
134 
135  public:
136 
137  // services
138  // ------------------------------------------------------
139 
140  public:
141 
142  // visitors
143  // ------------------------------------------------------
144 
145  virtual void acceptIn (basevisitor* v);
146  virtual void acceptOut (basevisitor* v);
147 
148  virtual void browseData (basevisitor* v);
149 
150  public:
151 
152  // print
153  // ------------------------------------------------------
154 
155  void printTraceOahHelp ();
156 
157  void printTraceOahValues (int fieldWidth);
158 
159  virtual void printAtomOptionsValues (
160  ostream& os,
161  int valueFieldWidth) const;
162 
163  public:
164 
165  // options and help trace
166  // --------------------------------------
167 
168  bool fTraceOah;
169  bool fTraceOahDetails;
170 
171  // other
172  // --------------------------------------
173 
174  // passes
175  bool fTracePasses;
176  // scaling
177  bool fTraceGeometry;
178  // varValAssocs
179  bool fTraceVarValAssocs; // specialize ??? JMI
180  // for tests, hidden
181  bool fTraceForTests;
182 
183 
184  // score to voices
185  // --------------------------------------
186 
187  // score
188  bool fTraceScore;
189  // part groups
190  bool fTracePartGroups;
191  bool fTracePartGroupsDetails;
192  // parts
193  bool fTraceParts;
194  // staves
195  bool fTraceStaves;
196  // staff details
197  bool fTraceStaffDetails;
198  // staff changes
199  bool fTraceStaffChanges;
200  // voices
201  bool fTraceVoices;
202  bool fTraceVoicesDetails;
203 
204 
205  // segments and measures
206  // --------------------------------------
207 
208  // segments
209  bool fTraceSegments;
210  bool fTraceSegmentsDetails;
211  // measures
212  bool fTraceMeasuresNumbers;
213  bool fTraceMeasures;
214  bool fTraceMeasuresDetails;
215  bool fTracePositionsInMeasures;
216  set<int> fTraceDetailedMeasureNumbersSet;
217 
218 
219  // clefs to tempos
220  // --------------------------------------
221 
222  // clefs
223  bool fTraceClefs;
224  // keys
225  bool fTraceKeys;
226  // times
227  bool fTraceTimes;
228  // tempos
229  bool fTraceTempos;
230 
231 
232  // breaks and barlines
233  // --------------------------------------
234 
235  // line breaks
236  bool fTraceLineBreaks;
237  // page breaks
238  bool fTracePageBreaks;
239  // barlines
240  bool fTraceBarlines;
241  // barlines details
242  bool fTraceBarlinesDetails;
243 
244 
245  // bar checks
246  // --------------------------------------
247 
248  bool fTraceBarChecks;
249 
250 
251  // bar number checks
252  // --------------------------------------
253 
254  bool fTraceBarNumberChecks;
255 
256 
257  // transpositions
258  // --------------------------------------
259 
260  // transpositions
261  bool fTraceTranspositions;
262  // octave shifts
263  bool fTraceOctaveShifts;
264 
265 
266  // repeats to slashes
267  // --------------------------------------
268 
269  // repeats
270  bool fTraceRepeats;
271  bool fTraceRepeatsDetails;
272  // measures repeats
273  bool fTraceMeasuresRepeats;
274  // rest measures
275  bool fTraceRestMeasures;
276  // beats repeats
277  bool fTraceBeatsRepeats;
278  // slashes
279  bool fTraceSlashes;
280 
281 
282  // notes
283  // --------------------------------------
284 
285  // notes
286  bool fTraceNotes;
287  // notes details
288  bool fTraceNotesDetails;
289  // whole notes
290  bool fTraceWholeNotes;
291  bool fTraceWholeNotesDetails;
292  // skip notes
293  bool fTraceSkipNotes;
294  // rest notes
295  bool fTraceRestNotes;
296  // notes octave entry
297  bool fTraceNotesOctaveEntry;
298  // grace notes
299  bool fTraceGraceNotes;
300  // tremolos
301  bool fTraceTremolos;
302 
303 
304  // note attachments
305  // --------------------------------------
306 
307  // stems
308  bool fTraceStems;
309  // beams
310  bool fTraceBeams;
311  // articulations
312  bool fTraceArticulations;
313  // technicals
314  bool fTraceTechnicals;
315  // ornaments
316  bool fTraceOrnaments;
317  // dynamics
318  bool fTraceDynamics;
319 
320 
321  // spanners
322  // --------------------------------------
323 
324  // spanners
325  bool fTraceSpanners; // ???
326  // wedges
327  bool fTraceWedges;
328  // spanners
329  // slurs
330  bool fTraceSlurs;
331  // ligatures
332  bool fTraceLigatures;
333 
334 
335  // credits to words
336  // --------------------------------------
337 
338  // credits
339  bool fTraceCredits;
340  // lyrics
341  bool fTraceLyrics;
342  bool fTraceLyricsDetails;
343  // words
344  bool fTraceWords;
345 
346 
347  // chords and tuplets
348  // --------------------------------------
349 
350  // chords
351  bool fTraceChords;
352  bool fTraceChordsDetails;
353  // tuplets
354  bool fTraceTuplets;
355  bool fTraceTupletsDetails;
356  // extra chords
357  bool fTraceExtraChords;
358 
359 
360  // inter-notes
361  // --------------------------------------
362 
363  // ties
364  bool fTraceTies;
365  // glissandos
366  bool fTraceGlissandos;
367 
368 
369  // above staff
370  // --------------------------------------
371 
372  // rehearsals
373  bool fTraceRehearsals;
374  // segnos
375  bool fTraceSegnos;
376  // codas
377  bool fTraceCodas;
378  // eyeglases
379  bool fTraceEyeGlasses;
380 
381 
382  // harmonies and figured basses
383  // --------------------------------------
384 
385  // harmonies
386  bool fTraceHarmonies;
387  // figured basses
388  bool fTraceFiguredBasses;
389 
390 
391  // instruments
392  // --------------------------------------
393 
394  // frames
395  bool fTraceFrames;
396  // scordaturas
397  bool fTraceScordaturas;
398  // slides
399  bool fTraceSlides;
400  // pedals
401  bool fTracePedals;
402  // accordion registrations
403  bool fTraceAccordionRegistrations;
404  // harp pedals
405  bool fTraceHarpPedals;
406  // harp pedals tuning
407  bool fTraceHarpPedalsTunings;
408  // damps
409  bool fTraceDamps;
410  // dampalls
411  bool fTraceDampAlls;
412  // midi
413  bool fTraceMidi;
414 
415 
416 /* JMI
417  // msrStreams
418  // --------------------------------------
419  bool fTraceMsrStreams;
420 
421  // layout
422 */
423 
424  private:
425 
426  // private work fields
427  // --------------------------------------
428 
429  S_oahPrefix fShortTracePrefix;
430  S_oahPrefix fLongTracePrefix;
431 };
433 EXP ostream& operator<< (ostream& os, const S_traceOah& elt);
434 
435 EXP extern S_traceOah gTraceOah;
436 EXP extern S_traceOah gTraceOahUserChoices;
437 EXP extern S_traceOah gTraceOahWithDetailedTrace;
438 
439 //______________________________________________________________________________
440 void initializeTraceOahHandling (
441  S_oahHandler handler);
442 
443 
444 }
445 
446 
447 #endif
448 
449 
450 #endif
the smart pointer implementation
Definition: smartpointer.h:58
Definition: basevisitor.h:25
Definition: oahBasicTypes.h:2854
Definition: traceOah.h:34