LibMusicXML 3.18
msrRehearsals.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 ___msrRehearsals___
14#define ___msrRehearsals___
15
16#include "msrMeasureElements.h"
17
18#include "msrBasicTypes.h"
19
20
21namespace MusicXML2
22{
23
24//______________________________________________________________________________
26{
27 public:
28
29 // data types
30 // ------------------------------------------------------
31
32 enum msrRehearsalKind {
33 kNone,
34 kRectangle, kOval, kCircle, kBracket, kTriangle, kDiamond };
35
36 static string rehearsalKindAsString (
37 msrRehearsalKind rehearsalKind);
38
39 // creation from MusicXML
40 // ------------------------------------------------------
41
42 static SMARTP<msrRehearsal> create (
43 int inputLineNumber,
44 msrRehearsalKind rehearsalKind,
45 string rehearsalText,
46 msrPlacementKind rehearsalPlacementKind);
47
48 protected:
49
50 // constructors/destructor
51 // ------------------------------------------------------
52
54 int inputLineNumber,
55 msrRehearsalKind rehearsalKind,
56 string rehearsalText,
57 msrPlacementKind rehearsalPlacementKind);
58
59 virtual ~msrRehearsal ();
60
61 public:
62
63 // set and get
64 // ------------------------------------------------------
65
66 msrRehearsalKind getRehearsalKind () const
67 { return fRehearsalKind; }
68
69 msrPlacementKind getRehearsalPlacementKind () const
70 { return fRehearsalPlacementKind; }
71
72 // services
73 string getRehearsalText () const
74 { return fRehearsalText; }
75
76 // services
77 // ------------------------------------------------------
78
79 public:
80
81 // visitors
82 // ------------------------------------------------------
83
84 virtual void acceptIn (basevisitor* v);
85 virtual void acceptOut (basevisitor* v);
86
87 virtual void browseData (basevisitor* v);
88
89 public:
90
91 // print
92 // ------------------------------------------------------
93
94 virtual void print (ostream& os) const;
95
96 private:
97
98 // fields
99 // ------------------------------------------------------
100
101 msrRehearsalKind fRehearsalKind;
102
103 string fRehearsalText;
104
105 msrPlacementKind fRehearsalPlacementKind;
106};
108EXP ostream& operator<< (ostream& os, const S_msrRehearsal& elt);
109
110
111} // namespace MusicXML2
112
113
114#endif
the smart pointer implementation
Definition: smartpointer.h:58
Definition: basevisitor.h:25
Definition: msrMeasureElements.h:24
Definition: msrRehearsals.h:26