LibMusicXML 3.18
lpsrComments.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 ___lpsrComments___
14#define ___lpsrComments___
15
16#include "lpsrElements.h"
17
18
19using namespace std;
20
21namespace MusicXML2
22{
23
24//______________________________________________________________________________
26{
27 public:
28
29 // data types
30 // ------------------------------------------------------
31
32 enum lpsrCommentGapKind {
33 kGapAfterwards, kNoGapAfterwards};
34
35 static string commentGapKindAsString (
36 lpsrCommentGapKind commentGapKind);
37
38 // creation from MusicXML
39 // ------------------------------------------------------
40
41 static SMARTP<lpsrComment> create (
42 int inputLineNumber,
43 string contents,
44 lpsrCommentGapKind commentGapKind = kNoGapAfterwards);
45
46 protected:
47
48 // constructors/destructor
49 // ------------------------------------------------------
50
52 int inputLineNumber,
53 string contents,
54 lpsrCommentGapKind commentGapKind = kNoGapAfterwards);
55
56 virtual ~lpsrComment ();
57
58 public:
59
60 // set and get
61 // ------------------------------------------------------
62
63 string getContents () const
64 { return fContents; }
65
66 lpsrCommentGapKind getCommentGapKind () const
67 { return fCommentGapKind; }
68
69 // services
70 // ------------------------------------------------------
71
72 public:
73
74 // visitors
75 // ------------------------------------------------------
76
77 virtual void acceptIn (basevisitor* v);
78 virtual void acceptOut (basevisitor* v);
79
80 virtual void browseData (basevisitor* v);
81
82 public:
83
84 // print
85 // ------------------------------------------------------
86
87 virtual void print (ostream& os) const;
88
89 private:
90
91 // fields
92 // ------------------------------------------------------
93
94 string fContents;
95 lpsrCommentGapKind fCommentGapKind;
96};
98EXP ostream& operator<< (ostream& os, const S_lpsrComment& elt);
99
100
101}
102
103
104#endif
Definition: basevisitor.h:25
Definition: lpsrComments.h:26
Definition: lpsrElements.h:24