LibMusicXML 3.18
bsrCellsLists.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 ___bsrCellsLists___
14#define ___bsrCellsLists___
15
16#include "bsrElements.h"
17
18#include "bsrBasicTypes.h"
19
20
21using namespace std;
22
23namespace MusicXML2
24{
25
26//______________________________________________________________________________
27class bsrCellsList;
28typedef SMARTP<bsrCellsList> S_bsrCellsList;
29
30class bsrCellsList : public smartable
31{
32 public:
33
34 // creation
35 // ------------------------------------------------------
36
37 static SMARTP<bsrCellsList> create (
38 int inputLineNumber);
39
40 static SMARTP<bsrCellsList> create (
41 int inputLineNumber,
42 bsrCellKind cellKind1);
43
44 static SMARTP<bsrCellsList> create (
45 int inputLineNumber,
46 bsrCellKind cellKind1,
47 bsrCellKind cellKind2);
48
49 static SMARTP<bsrCellsList> create (
50 int inputLineNumber,
51 bsrCellKind cellKind1,
52 bsrCellKind cellKind2,
53 bsrCellKind cellKind3);
54
55 static SMARTP<bsrCellsList> create (
56 int inputLineNumber,
57 bsrCellKind cellKind1,
58 bsrCellKind cellKind2,
59 bsrCellKind cellKind3,
60 bsrCellKind cellKind4);
61
62 static SMARTP<bsrCellsList> create (
63 int inputLineNumber,
64 bsrCellKind cellKind1,
65 bsrCellKind cellKind2,
66 bsrCellKind cellKind3,
67 bsrCellKind cellKind4,
68 bsrCellKind cellKind5);
69
70 static SMARTP<bsrCellsList> create (
71 int inputLineNumber,
72 bsrCellKind cellKind1,
73 bsrCellKind cellKind2,
74 bsrCellKind cellKind3,
75 bsrCellKind cellKind4,
76 bsrCellKind cellKind5,
77 bsrCellKind cellKind6);
78
79 protected:
80
81 // constructors/destructor
82 // ------------------------------------------------------
83
85 int inputLineNumber);
86
88 int inputLineNumber,
89 bsrCellKind cellKind1);
90
92 int inputLineNumber,
93 bsrCellKind cellKind1,
94 bsrCellKind cellKind2);
95
97 int inputLineNumber,
98 bsrCellKind cellKind1,
99 bsrCellKind cellKind2,
100 bsrCellKind cellKind3);
101
103 int inputLineNumber,
104 bsrCellKind cellKind1,
105 bsrCellKind cellKind2,
106 bsrCellKind cellKind3,
107 bsrCellKind cellKind4);
108
110 int inputLineNumber,
111 bsrCellKind cellKind1,
112 bsrCellKind cellKind2,
113 bsrCellKind cellKind3,
114 bsrCellKind cellKind4,
115 bsrCellKind cellKind5);
116
118 int inputLineNumber,
119 bsrCellKind cellKind1,
120 bsrCellKind cellKind2,
121 bsrCellKind cellKind3,
122 bsrCellKind cellKind4,
123 bsrCellKind cellKind5,
124 bsrCellKind cellKind6);
125
126 virtual ~bsrCellsList ();
127
128 public:
129
130 // set and get
131 // ------------------------------------------------------
132
133 const list<bsrCellKind>&
134 getCellsListElements () const
135 { return fCellsListElements; }
136
137 // services
138 // ------------------------------------------------------
139
140 void appendCellKindToCellsList (bsrCellKind cellKind)
141 { fCellsListElements.push_back (cellKind); }
142
143 void appendCellsListToCellsList (
144 S_bsrCellsList otherCellsList);
145
146 void prependCellsListToCellsList (
147 S_bsrCellsList otherCellsList);
148
149 int fetchCellsNumber () const
150 { return fCellsListElements.size (); }
151
152 void generateBrailleCode (ostream& os);
153
154 public:
155
156 // visitors
157 // ------------------------------------------------------
158
159 virtual void acceptIn (basevisitor* v);
160 virtual void acceptOut (basevisitor* v);
161
162 virtual void browseData (basevisitor* v);
163
164 public:
165
166 // print
167 // ------------------------------------------------------
168
169 virtual std::string asString () const;
170
171 virtual std::string asShortString () const;
172
173 virtual void print (ostream& os) const;
174
175 protected:
176
177 // fields
178 // ------------------------------------------------------
179
180 list<bsrCellKind> fCellsListElements;
181};
182EXP ostream& operator<< (ostream& os, const S_bsrCellsList& elt);
183
184
185} // namespace MusicXML2
186
187
188#endif
the smart pointer implementation
Definition: smartpointer.h:58
Definition: basevisitor.h:25
Definition: bsrCellsLists.h:31
the base class for smart pointers implementation
Definition: smartpointer.h:29