LibMusicXML 3.18
bsrLines_MUT_DEP.h
1/*
2 This file is to be included only by bsrMutualDependencies.h,
3 to satisfy declarations mutual dependencies.
4*/
5
6//______________________________________________________________________________
7class bsrLineContents : public bsrElement
8{
9 public:
10
11 // data types
12 // ------------------------------------------------------
13
14 enum bsrLineContentsKind {
15 kLineContentsRegular,
16 kLineContentsContinuation };
17
18 static string lineContentsKindAsString (
19 bsrLineContentsKind lineContentsKind);
20
21 public:
22
23 // creation
24 // ------------------------------------------------------
25
26 static SMARTP<bsrLineContents> create (
27 int inputLineNumber,
28 bsrLineContentsKind lineContentsKind);
29
30 SMARTP<bsrLineContents> createLineNewbornClone ();
31
32 protected:
33
34 // constructors/destructor
35 // ------------------------------------------------------
36
38 int inputLineNumber,
39 bsrLineContentsKind lineContentsKind);
40
41 virtual ~bsrLineContents ();
42
43 public:
44
45 // set and get
46 // ------------------------------------------------------
47
48 void setBsrLineUpLink (
49 S_bsrLine bsrLineUpLink);
50
51 S_bsrLine getBsrLineUpLink () const;
52
53 bsrLineContentsKind getLineContentsKind () const
54 { return fLineContentsKind; }
55
56 const list<S_bsrLineElement>&
57 getLineContentsElementsList () const
58 { return fLineContentsElementsList; }
59
60 public:
61
62 // services
63 // ------------------------------------------------------
64
65 void appendLineElementToLineContents (
66 S_bsrLineElement lineElement);
67
68 void insertLineElementBeforeLastElementOfLineContents (
69 S_bsrLineElement lineElement);
70
71 int fetchCellsNumber () const;
72
73 public:
74
75 // visitors
76 // ------------------------------------------------------
77
78 virtual void acceptIn (basevisitor* v);
79 virtual void acceptOut (basevisitor* v);
80
81 virtual void browseData (basevisitor* v);
82
83 public:
84
85 // print
86 // ------------------------------------------------------
87
88 virtual std::string asString () const;
89
90 virtual std::string asShortString () const;
91
92 virtual void print (ostream& os) const;
93
94 protected:
95
96 // fields
97 // ------------------------------------------------------
98
99 S_bsrLine fBsrLineUpLink;
100
101 bsrLineContentsKind fLineContentsKind;
102
103 list<S_bsrLineElement>
104 fLineContentsElementsList;
105};
106typedef SMARTP<bsrLineContents> S_bsrLineContents;
107EXP ostream& operator<< (ostream& os, const S_bsrLineContents& elt);
108
109//______________________________________________________________________________
111{
112 public:
113
114 // creation
115 // ------------------------------------------------------
116
117 static SMARTP<bsrLine> create (
118 int inputLineNumber,
119 int printLineNumber,
120 int cellsPerLine);
121
122 SMARTP<bsrLine> createLineNewbornClone ();
123
124 protected:
125
126 // constructors/destructor
127 // ------------------------------------------------------
128
129 bsrLine (
130 int inputLineNumber,
131 int printLineNumber,
132 int cellsPerLine);
133
134 virtual ~bsrLine ();
135
136 public:
137
138 // set and get
139 // ------------------------------------------------------
140
141 int getPrintLineNumber () const
142 { return fPrintLineNumber; }
143
144 int getBrailleLineNumber () const
145 { return fBrailleLineNumber; }
146
147 int getCellsPerLine () const
148 { return fCellsPerLine; }
149
150 public:
151
152 // public services
153 // ------------------------------------------------------
154
155 void appendSpacesToLine (S_bsrSpaces spaces);
156
157 void appendMeasureToLine (S_bsrMeasure measure);
158
159 void appendKeyToLine (S_bsrKey key);
160
161 void appendTimeToLine (S_bsrTime time);
162
163 void insertTimeBeforeLastElementOfLine (S_bsrTime time);
164
165 void appendTempoToLine (S_bsrTempo tempo);
166
167 void appendNoteToLine (S_bsrNote note);
168
169 int fetchLineContentsNumber () const
170 { return fLineContentsList.size (); }
171
172 S_bsrCellsList fetchCellsList () const
173 { return buildLineNumberCellsList (); } // JMI ???
174
175 int fetchCellsNumber () const;
176
177 private:
178
179 // private services
180 // ------------------------------------------------------
181
182 S_bsrCellsList buildLineNumberCellsList () const;
183
184 void appendLineElementToLine (
185 S_bsrLineElement lineElement);
186
187 void insertElementBeforeLastElementOfLine (
188 S_bsrLineElement lineElement);
189
190 void appendLineElementToLastMeasureOfLine (
191 S_bsrLineElement lineElement);
192
193 public:
194
195 // visitors
196 // ------------------------------------------------------
197
198 virtual void acceptIn (basevisitor* v);
199 virtual void acceptOut (basevisitor* v);
200
201 virtual void browseData (basevisitor* v);
202
203 public:
204
205 // print
206 // ------------------------------------------------------
207
208 virtual std::string asString () const;
209
210 virtual void print (ostream& os) const;
211
212 protected:
213
214 // fields
215 // ------------------------------------------------------
216
217 int fPrintLineNumber;
218 int fBrailleLineNumber;
219
220 int fCellsPerLine;
221
222 S_bsrCellsList fLineNumberCellsList;
223 list<S_bsrLineContents>
224 fLineContentsList;
225 bool fASpaceIsNeededInLine;
226};
227typedef SMARTP<bsrLine> S_bsrLine;
228EXP ostream& operator<< (ostream& os, const S_bsrLine& elt);
Definition: bsrLines_MUT_DEP.h:8
Definition: bsrLines_MUT_DEP.h:111
Definition: bsrPageElements_MUT_DEP.h:8