LibMusicXML  3.18
bsrParallels.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 ___bsrParallels___
14 #define ___bsrParallels___
15 
16 #include "bsrMutualDependencies.h"
17 
18 #include "bsrOah.h"
19 
20 
21 namespace MusicXML2
22 {
23 
24 //______________________________________________________________________________
25 class bsrParallel : public bsrElement
26 {
27  public:
28 
29  // data types
30  // ------------------------------------------------------
31 
32  enum bsrParallelLayoutKind {
33  kParallelLayoutBarOverBarKind,
34  kParallelLayoutLineOverLineKind };
35 
36  static string parallelLayoutKindAsString (
37  bsrParallelLayoutKind parallelLayoutKind);
38 
39  // creation
40  // ------------------------------------------------------
41 
42  static SMARTP<bsrParallel> create (
43  int inputLineNumber);
44 
45  protected:
46 
47  // constructors/destructor
48  // ------------------------------------------------------
49 
50  bsrParallel (
51  int inputLineNumber);
52 
53  virtual ~bsrParallel ();
54 
55  public:
56 
57  // set and get
58  // ------------------------------------------------------
59 
60  int getPrintParallelNumber () const
61  { return fPrintParallelNumber; }
62 
63  int getBrailleParallelNumber () const
64  { return fBrailleParallelNumber; }
65 
66  public:
67 
68  // public services
69  // ------------------------------------------------------
70 
71  void appendLineToParallel (S_bsrLine line)
72  { fParallelElementsList.push_back (line); }
73 
74  public:
75 
76  // visitors
77  // ------------------------------------------------------
78 
79  virtual void acceptIn (basevisitor* v);
80  virtual void acceptOut (basevisitor* v);
81 
82  virtual void browseData (basevisitor* v);
83 
84  public:
85 
86  // print
87  // ------------------------------------------------------
88 
89  virtual void print (ostream& os) const;
90 
91  private:
92 
93  // fields
94  // ------------------------------------------------------
95 
96  int fPrintParallelNumber;
97  int fBrailleParallelNumber;
98 
99  list<S_bsrElement>
100  fParallelElementsList;
101 };
103 EXP ostream& operator<< (ostream& os, const S_bsrParallel& elt);
104 
105 
106 }
107 
108 
109 #endif
MusicXML2::bsrParallel
Definition: bsrParallels.h:26
MusicXML2::bsrElement
Definition: bsrElements.h:24
MusicXML2::SMARTP
the smart pointer implementation
Definition: smartpointer.h:58
MusicXML2::basevisitor
Definition: basevisitor.h:25