LibMusicXML 3.18
msrBeams.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 ___msrBeams___
14#define ___msrBeams___
15
16#include "msrElements.h"
17
18#include "msrBasicTypes.h"
19
20
21namespace MusicXML2
22{
23
24//______________________________________________________________________________
25class msrBeam : public msrElement
26{
27 public:
28
29 // data types
30 // ------------------------------------------------------
31
32 enum msrBeamKind {
33 k_NoBeam,
34 kBeginBeam, kContinueBeam, kEndBeam,
35 kForwardHookBeam, kBackwardHookBeam};
36
37 static string beamKindAsString (
38 msrBeamKind beamKind);
39
40 // creation from MusicXML
41 // ------------------------------------------------------
42
43 static SMARTP<msrBeam> create (
44 int inputLineNumber,
45 int number,
46 msrBeamKind beamKind);
47
48 protected:
49
50 // constructors/destructor
51 // ------------------------------------------------------
52
53 msrBeam (
54 int inputLineNumber,
55 int number,
56 msrBeamKind beamKind);
57
58 virtual ~msrBeam ();
59
60 public:
61
62 // set and get
63 // ------------------------------------------------------
64
65 msrBeamKind getBeamKind () const
66 { return fBeamKind; }
67
68 int getBeamNumber () const
69 { return fBeamNumber; }
70
71 // services
72 // ------------------------------------------------------
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 string asString () const;
90
91 virtual void print (ostream& os) const;
92
93 private:
94
95 // fields
96 // ------------------------------------------------------
97
98 int fBeamNumber;
99 msrBeamKind fBeamKind;
100};
102EXP ostream& operator<< (ostream& os, const S_msrBeam& elt);
103
104
105} // namespace MusicXML2
106
107
108#endif
the smart pointer implementation
Definition: smartpointer.h:58
Definition: basevisitor.h:25
Definition: msrBeams.h:26
Definition: msrElements.h:26