LibMusicXML 3.18
msrStems.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 ___msrStems___
14#define ___msrStems___
15
16#include "msrElements.h"
17
18#include "msrBasicTypes.h"
19
20
21namespace MusicXML2
22{
23
24//______________________________________________________________________________
25class msrStem : public msrElement
26{
27 public:
28
29 // data types
30 // ------------------------------------------------------
31
32 enum msrStemKind {
33 kStemNone,
34 kStemUp, kStemDown, kStemDouble};
35
36 static string stemKindAsString (
37 msrStemKind stemKind);
38
39 // creation from MusicXML
40 // ------------------------------------------------------
41
42 static SMARTP<msrStem> create (
43 int inputLineNumber,
44 msrStemKind stemKind);
45
46 protected:
47
48 // constructors/destructor
49 // ------------------------------------------------------
50
51 msrStem (
52 int inputLineNumber,
53 msrStemKind stemKind);
54
55 virtual ~msrStem ();
56
57 public:
58
59 // set and get
60 // ------------------------------------------------------
61
62 msrStemKind getStemKind () const
63 { return fStemKind; }
64
65 // services
66 // ------------------------------------------------------
67
68 public:
69
70 // visitors
71 // ------------------------------------------------------
72
73 virtual void acceptIn (basevisitor* v);
74 virtual void acceptOut (basevisitor* v);
75
76 virtual void browseData (basevisitor* v);
77
78 public:
79
80 // print
81 // ------------------------------------------------------
82
83 string asString () const;
84
85 virtual void print (ostream& os) const;
86
87 private:
88
89 // fields
90 // ------------------------------------------------------
91
92 msrStemKind fStemKind;
93};
95EXP ostream& operator<< (ostream& os, const S_msrStem& elt);
96
97
98} // namespace MusicXML2
99
100
101#endif
Definition: basevisitor.h:25
Definition: msrElements.h:26
Definition: msrStems.h:26