LibMusicXML  3.18
extraOah.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 ___extraOah___
14 #define ___extraOah___
15 
16 
17 #include "setExtraOahIfDesired.h"
18 
19 #ifdef EXTRA_OAH
20 
21 
22 #include "oahBasicTypes.h"
23 
24 #include "exports.h"
25 
26 
27 namespace MusicXML2
28 {
29 
30 //______________________________________________________________________________
32 {
33  public:
34 
35  // creation
36  // ------------------------------------------------------
37 
39  string shortName,
40  string longName,
41  string description);
42 
43  protected:
44 
45  // constructors/destructor
46  // ------------------------------------------------------
47 
49  string shortName,
50  string longName,
51  string description);
52 
54 
55  public:
56 
57  // set and get
58  // ------------------------------------------------------
59 
60  public:
61 
62  // services
63  // ------------------------------------------------------
64 
65  S_oahValuedAtom handleOptionUnderName (
66  string optionName,
67  ostream& os);
68 
69  public:
70 
71  // visitors
72  // ------------------------------------------------------
73 
74  virtual void acceptIn (basevisitor* v);
75  virtual void acceptOut (basevisitor* v);
76 
77  virtual void browseData (basevisitor* v);
78 
79  public:
80 
81  // print
82  // ------------------------------------------------------
83 
84  void print (ostream& os) const;
85 
86  void printAllChordsStructures (ostream& os) const;
87 
88  void printAtomOptionsValues (
89  ostream& os,
90  int valueFieldWidth) const;
91 
92  private:
93 
94  // fields
95  // ------------------------------------------------------
96 };
98 EXP ostream& operator<< (ostream& os, const S_extraShowAllChordsStructuresAtom& elt);
99 
100 //______________________________________________________________________________
102 {
103  public:
104 
105  // creation
106  // ------------------------------------------------------
107 
109  string shortName,
110  string longName,
111  string description,
112  string valueSpecification,
113  string variableName,
114  string& stringVariable);
115 
116  protected:
117 
118  // constructors/destructor
119  // ------------------------------------------------------
120 
122  string shortName,
123  string longName,
124  string description,
125  string valueSpecification,
126  string variableName,
127  string& stringVariable);
128 
129  virtual ~extraShowAllChordsContentsAtom ();
130 
131  public:
132 
133  // set and get
134  // ------------------------------------------------------
135 
136  void setStringVariable (
137  string value)
138  { fStringVariable = value; }
139 
140  public:
141 
142  // services
143  // ------------------------------------------------------
144 
145  S_oahValuedAtom handleOptionUnderName (
146  string optionName,
147  ostream& os);
148 
149  void handleValue (
150  string theString,
151  ostream& os);
152 
153  public:
154 
155  // visitors
156  // ------------------------------------------------------
157 
158  virtual void acceptIn (basevisitor* v);
159  virtual void acceptOut (basevisitor* v);
160 
161  virtual void browseData (basevisitor* v);
162 
163  public:
164 
165  // print
166  // ------------------------------------------------------
167 
168  void print (ostream& os) const;
169 
170  void printAllChordsContents (
171  ostream& os,
172  msrSemiTonesPitchKind semiTonesPitchKind) const;
173 
174  void printAtomOptionsValues (
175  ostream& os,
176  int valueFieldWidth) const;
177 
178  private:
179 
180  // fields
181  // ------------------------------------------------------
182 
183  string& fStringVariable;
184 };
186 EXP ostream& operator<< (ostream& os, const S_extraShowAllChordsContentsAtom& elt);
187 
188 //______________________________________________________________________________
190 {
191  public:
192 
193  // creation
194  // ------------------------------------------------------
195 
196  static SMARTP<extraShowChordDetailsAtom> create (
197  string shortName,
198  string longName,
199  string description,
200  string valueSpecification,
201  string variableName,
202  string& stringVariable);
203 
204  protected:
205 
206  // constructors/destructor
207  // ------------------------------------------------------
208 
210  string shortName,
211  string longName,
212  string description,
213  string valueSpecification,
214  string variableName,
215  string& stringVariable);
216 
217  virtual ~extraShowChordDetailsAtom ();
218 
219  public:
220 
221  // set and get
222  // ------------------------------------------------------
223 
224  void setShowChordDetailsVariableValue (
225  string value)
226  { fStringVariable = value; }
227 
228  public:
229 
230  // services
231  // ------------------------------------------------------
232 
233  S_oahValuedAtom handleOptionUnderName (
234  string optionName,
235  ostream& os);
236 
237  void handleValue (
238  string theString,
239  ostream& os);
240 
241  public:
242 
243  // visitors
244  // ------------------------------------------------------
245 
246  virtual void acceptIn (basevisitor* v);
247  virtual void acceptOut (basevisitor* v);
248 
249  virtual void browseData (basevisitor* v);
250 
251  public:
252 
253  // print
254  // ------------------------------------------------------
255 
256  void print (ostream& os) const;
257 
258  void printAtomOptionsValues (
259  ostream& os,
260  int valueFieldWidth) const;
261 
262  private:
263 
264  // fields
265  // ------------------------------------------------------
266 
267  string& fStringVariable;
268 };
270 EXP ostream& operator<< (ostream& os, const S_extraShowChordDetailsAtom& elt);
271 
272 //______________________________________________________________________________
274 {
275  public:
276 
277  // creation
278  // ------------------------------------------------------
279 
280  static SMARTP<extraShowChordAnalysisAtom> create (
281  string shortName,
282  string longName,
283  string description,
284  string valueSpecification,
285  string variableName,
286  string& stringVariable);
287 
288  protected:
289 
290  // constructors/destructor
291  // ------------------------------------------------------
292 
294  string shortName,
295  string longName,
296  string description,
297  string valueSpecification,
298  string variableName,
299  string& stringVariable);
300 
301  virtual ~extraShowChordAnalysisAtom ();
302 
303  public:
304 
305  // set and get
306  // ------------------------------------------------------
307 
308  void setShowChordAnalysisVariableValue (
309  string value)
310  { fStringVariable = value; }
311 
312  public:
313 
314  // services
315  // ------------------------------------------------------
316 
317  S_oahValuedAtom handleOptionUnderName (
318  string optionName,
319  ostream& os);
320 
321  void handleValue (
322  string theString,
323  ostream& os);
324 
325  public:
326 
327  // visitors
328  // ------------------------------------------------------
329 
330  virtual void acceptIn (basevisitor* v);
331  virtual void acceptOut (basevisitor* v);
332 
333  virtual void browseData (basevisitor* v);
334 
335  public:
336 
337  // print
338  // ------------------------------------------------------
339 
340  void print (ostream& os) const;
341 
342  void printAtomOptionsValues (
343  ostream& os,
344  int valueFieldWidth) const;
345 
346  private:
347 
348  // fields
349  // ------------------------------------------------------
350 
351  string& fStringVariable;
352 };
354 EXP ostream& operator<< (ostream& os, const S_extraShowChordAnalysisAtom& elt);
355 
356 //______________________________________________________________________________
357 class extraOah : public oahGroup
358 {
359  public:
360 
361  // creation
362  // ------------------------------------------------------
363 
364  static SMARTP<extraOah> create (
365  S_oahHandler handlerUpLink);
366 
367  SMARTP<extraOah> createCloneWithDetailedTrace ();
368 
369  private:
370 
371  // initialisation
372  // ------------------------------------------------------
373 
374  void initializeExtraOah (
375  bool boolOptionsInitialValue);
376 
377  protected:
378 
379  // constructors/destructor
380  // ------------------------------------------------------
381 
382  extraOah (
383  S_oahHandler handlerUpLink);
384 
385  virtual ~extraOah ();
386 
387  public:
388 
389  // quiet mode
390  // ------------------------------------------------------
391 
392  void enforceQuietness ();
393 
394  public:
395 
396  // consistency check
397  // ------------------------------------------------------
398 
399  virtual void checkOptionsConsistency ();
400 
401  public:
402 
403  // public services
404  // ------------------------------------------------------
405 
406  private:
407 
408  // private services
409  // ------------------------------------------------------
410 
411  void initializeExtraShowAllChordsStructuresOptions (
412  bool boolOptionsInitialValue);
413 
414  void initializeExtraShowAllChordsContentsOptions (
415  bool boolOptionsInitialValue);
416 
417  void initializeExtraShowChordDetailsOptions (
418  bool boolOptionsInitialValue);
419 
420  void initializeExtraShowChordAnalysisOptions (
421  bool boolOptionsInitialValue);
422 
423  public:
424 
425  // visitors
426  // ------------------------------------------------------
427 
428  virtual void acceptIn (basevisitor* v);
429  virtual void acceptOut (basevisitor* v);
430 
431  virtual void browseData (basevisitor* v);
432 
433  public:
434 
435  // print
436  // ------------------------------------------------------
437 
438  void printExtraOahHelp ();
439 
440  void printExtraOahValues (int fieldWidth);
441 
442  public:
443 
444  // fields
445  // ------------------------------------------------------
446 
447  string fChordsRootAsString; // JMI
448 };
450 EXP ostream& operator<< (ostream& os, const S_extraOah& elt);
451 
452 EXP extern S_extraOah gExtraOah;
453 EXP extern S_extraOah gExtraOahUserChoices;
454 EXP extern S_extraOah gExtraOahWithDetailedTrace;
455 
456 //______________________________________________________________________________
457 void initializeExtraOahHandling (
458  S_oahHandler handler);
459 
460 
461 }
462 
463 
464 #endif
465 
466 
467 #endif
the smart pointer implementation
Definition: smartpointer.h:58
Definition: basevisitor.h:25
Definition: extraOah.h:358
Definition: extraOah.h:274
Definition: extraOah.h:190
Definition: oahBasicTypes.h:59
Definition: oahBasicTypes.h:2854
Definition: oahBasicTypes.h:964