LibMusicXML  3.18
lpsrParallelMusic.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 ___lpsrParallelMusic___
14 #define ___lpsrParallelMusic___
15 /*
16 #include <sstream>
17 #include <vector>
18 
19 
20 #include "exports.h"
21 #include "typedefs.h"
22 
23 #include "msrBasicTypes.h"
24 
25 #include "msr.h"
26 
27 #include "lpsrVarValAssocs.h"
28 
29 #include "lpsrScheme.h"
30 */
31 
32 #include <string>
33 #include <list>
34 
35 #include "lpsrPartGroups.h"
36 
37 
38 using namespace std;
39 
40 namespace MusicXML2
41 {
42 
43 //______________________________________________________________________________
45 {
46  public:
47 
48  // data types
49  // ------------------------------------------------------
50 
51  enum lpsrElementsSeparatorKind {
52  kEndOfLine, kSpace};
53 
54  static string elementsSeparatorKindAsString (
55  lpsrElementsSeparatorKind elementsSeparatorKind);
56 
57  // creation from MusicXML
58  // ------------------------------------------------------
59 
60  static SMARTP<lpsrParallelMusicBLock> create (
61  int inputLineNumber,
62  lpsrElementsSeparatorKind elementsSeparatorKind);
63 
64  protected:
65 
66  // constructors/destructor
67  // ------------------------------------------------------
68 
70  int inputLineNumber,
71  lpsrElementsSeparatorKind elementsSeparatorKind);
72 
73  virtual ~lpsrParallelMusicBLock ();
74 
75  public:
76 
77  // set and get
78  // ------------------------------------------------------
79 
80  const list<S_lpsrPartGroupBlock>&
81  getParallelMusicBLockPartGroupBlocks () const
82  { return fParallelMusicBLockPartGroupBlocks; }
83 
84  // services
85  // ------------------------------------------------------
86 
87  void appendPartGroupBlockToParallelMusicBLock ( // JMI
88  S_lpsrPartGroupBlock partGroupBlock)
89  {
90  fParallelMusicBLockPartGroupBlocks.push_back (
91  partGroupBlock);
92  }
93 
94 /* JMI
95  S_lpsrPartGroupBlock getLastPartGroupBlockOfParallelMusicBLock ()
96  {
97  return
98  fParallelMusicBLockPartGroupBlocks.back ();
99  }
100 
101  void removeLastPartGroupBlockOfParallelMusicBLock () // JMI
102  {
103  fParallelMusicBLockPartGroupBlocks.pop_back ();
104  }
105 */
106 
107  public:
108 
109  // visitors
110  // ------------------------------------------------------
111 
112  virtual void acceptIn (basevisitor* v);
113  virtual void acceptOut (basevisitor* v);
114 
115  virtual void browseData (basevisitor* v);
116 
117  public:
118 
119  // print
120  // ------------------------------------------------------
121 
122  virtual void print (ostream& os) const;
123 
124  private:
125 
126  // fields
127  // ------------------------------------------------------
128 
129  list<S_lpsrPartGroupBlock>
130  fParallelMusicBLockPartGroupBlocks;
131 
132  lpsrElementsSeparatorKind
133  fElementsSeparatorKind;
134 };
136 EXP ostream& operator<< (ostream& os, const S_lpsrParallelMusicBLock& elt);
137 
138 
139 }
140 
141 
142 #endif
MusicXML2::lpsrElement
Definition: lpsrElements.h:24
MusicXML2::lpsrParallelMusicBLock
Definition: lpsrParallelMusic.h:45
MusicXML2::SMARTP< lpsrParallelMusicBLock >
MusicXML2::basevisitor
Definition: basevisitor.h:25