LibMusicXML 3.18
lpsrStaves.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 ___lpsrStaves___
14#define ___lpsrStaves___
15
16#include <iostream>
17
18#include "lpsrElements.h"
19
20#include "msr.h"
21
22
23using namespace std;
24
25namespace MusicXML2
26{
27
28//______________________________________________________________________________
30{
31 public:
32
33 // creation from MusicXML
34 // ------------------------------------------------------
35
36 static SMARTP<lpsrNewStaffgroupBlock> create (
37 int inputLineNumber);
38
39 protected:
40
41 // constructors/destructor
42 // ------------------------------------------------------
43
45 int inputLineNumber);
46
47 virtual ~lpsrNewStaffgroupBlock ();
48
49 public:
50
51 // set and get
52 // ------------------------------------------------------
53
54 // services
55 // ------------------------------------------------------
56
57 public:
58
59 // visitors
60 // ------------------------------------------------------
61
62 virtual void acceptIn (basevisitor* v);
63 virtual void acceptOut (basevisitor* v);
64
65 virtual void browseData (basevisitor* v);
66
67 public:
68
69 // print
70 // ------------------------------------------------------
71
72 virtual void print (ostream& os) const;
73
74 private:
75
76 // fields
77 // ------------------------------------------------------
78
79 vector<S_msrElement> fNewStaffgroupElements;
80};
82EXP ostream& operator<< (ostream& os, const S_lpsrNewStaffgroupBlock& elt);
83
84//______________________________________________________________________________
86{
87 public:
88
89 // creation from MusicXML
90 // ------------------------------------------------------
91
93 int inputLineNumber,
94 S_msrStaffTuning staffTuning);
95
96 protected:
97
98 // constructors/destructor
99 // ------------------------------------------------------
100
102 int inputLineNumber,
103 S_msrStaffTuning staffTuning);
104
105 virtual ~lpsrNewStaffTuningBlock ();
106
107 public:
108
109 // set and get
110 // ------------------------------------------------------
111
112 S_msrStaffTuning getStaffTuning () const
113 { return fStaffTuning; }
114
115 // services
116 // ------------------------------------------------------
117
118 public:
119
120 // visitors
121 // ------------------------------------------------------
122
123 virtual void acceptIn (basevisitor* v);
124 virtual void acceptOut (basevisitor* v);
125
126 virtual void browseData (basevisitor* v);
127
128 public:
129
130 // print
131 // ------------------------------------------------------
132
133 virtual void print (ostream& os) const;
134
135 private:
136
137 // fields
138 // ------------------------------------------------------
139
140 S_msrStaffTuning fStaffTuning;
141};
143EXP ostream& operator<< (ostream& os, const S_lpsrNewStaffTuningBlock& elt);
144
145//______________________________________________________________________________
147{
148 public:
149
150 // creation from MusicXML
151 // ------------------------------------------------------
152
153 static SMARTP<lpsrNewStaffBlock> create (
154 int inputLineNumber);
155
156 protected:
157
158 // constructors/destructor
159 // ------------------------------------------------------
160
162 int inputLineNumber);
163
164 virtual ~lpsrNewStaffBlock ();
165
166 public:
167
168 // set and get
169 // ------------------------------------------------------
170
171 // services
172 // ------------------------------------------------------
173
174 public:
175
176 // visitors
177 // ------------------------------------------------------
178
179 virtual void acceptIn (basevisitor* v);
180 virtual void acceptOut (basevisitor* v);
181
182 virtual void browseData (basevisitor* v);
183
184 public:
185
186 // print
187 // ------------------------------------------------------
188
189 virtual void print (ostream& os) const;
190
191 private:
192
193 // fields
194 // ------------------------------------------------------
195
196 vector<S_msrElement> fNewStaffElements;
197};
199EXP ostream& operator<< (ostream& os, const S_lpsrNewStaffBlock& elt);
200
201//______________________________________________________________________________
203{
204 public:
205
206 // creation from MusicXML
207 // ------------------------------------------------------
208
209 static SMARTP<lpsrStaffBlock> create (
210 S_msrStaff staff);
211
212 protected:
213
214 // constructors/destructor
215 // ------------------------------------------------------
216
218 S_msrStaff staff);
219
220 virtual ~lpsrStaffBlock ();
221
222 public:
223
224 // set and get
225 // ------------------------------------------------------
226
227 S_msrStaff getStaff () const
228 { return fStaff; }
229
230 const list<S_msrElement>&
231 getStaffBlockElements () const
232 { return fStaffBlockElements; }
233
234 void setStaffBlockInstrumentName (
235 string instrumentName)
236 {
237 fStaffBlockInstrumentName =
238 instrumentName;
239 }
240
241 string getStaffBlockInstrumentName () const
242 { return fStaffBlockInstrumentName; }
243
244 void setStaffBlockShortInstrumentName (
245 string shortInstrumentName)
246 {
247 fStaffBlockShortInstrumentName =
248 shortInstrumentName;
249 }
250
251 string getStaffBlockShortInstrumentName () const
252 { return fStaffBlockShortInstrumentName; }
253
254 public:
255
256 // public services
257 // ------------------------------------------------------
258
259 void appendVoiceUseToStaffBlock (
260 S_msrVoice voice);
261
262 void appendLyricsUseToStaffBlock (
263 S_msrStanza stanza);
264
265 void appendElementToStaffBlock (
266 S_msrElement elem)
267 { fStaffBlockElements.push_back (elem); }
268
269 public:
270
271 // visitors
272 // ------------------------------------------------------
273
274 virtual void acceptIn (basevisitor* v);
275 virtual void acceptOut (basevisitor* v);
276
277 virtual void browseData (basevisitor* v);
278
279 public:
280
281 // print
282 // ------------------------------------------------------
283
284 virtual void print (ostream& os) const;
285
286 private:
287
288 // fields
289 // ------------------------------------------------------
290
291 S_msrStaff fStaff;
292
293 list<S_msrElement> fStaffBlockElements;
294
295 string fStaffBlockInstrumentName;
296 string fStaffBlockShortInstrumentName;
297};
299EXP ostream& operator<< (ostream& os, const S_lpsrStaffBlock& elt);
300
301
302}
303
304
305#endif
the smart pointer implementation
Definition: smartpointer.h:58
Definition: basevisitor.h:25
Definition: lpsrElements.h:24
Definition: lpsrStaves.h:147
Definition: lpsrStaves.h:86
Definition: lpsrStaves.h:30
Definition: lpsrStaves.h:203