This file is indexed.

/usr/include/tse3/Part.h is in libtse3-dev 0.3.1-4.3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
/*
 * @(#)Part.h 3.00 25 May 1999
 *
 * Copyright (c) 2000 Pete Goodliffe (pete@cthree.org)
 *
 * This file is part of TSE3 - the Trax Sequencer Engine version 3.00.
 *
 * This library is modifiable/redistributable under the terms of the GNU
 * General Public License.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; see the file COPYING. If not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 *
 */

#ifndef TSE3_PART_H
#define TSE3_PART_H

#include "tse3/listen/Part.h"

#include "tse3/Notifier.h"
#include "tse3/Playable.h"
#include "tse3/Serializable.h"
#include "tse3/listen/Phrase.h"
#include "tse3/listen/MidiFilter.h"
#include "tse3/listen/MidiParams.h"
#include "tse3/listen/DisplayParams.h"

namespace TSE3
{
    class Part;
    class Track;

    /**
     * The Part class represents a placement of a @ref Phrase in a @ref Track.
     * It holds a reference to the @ref Phrase and the realtime parameters that
     * affect how the @ref Phrase sounds as it is played.
     *
     * A Part can only exist in one @ref Track at once.
     *
     * Each Part has a start and end time, which it manages. Before you insert
     * a Part in a @ref Track ensure that you have set the appropriate times
     * with @ref setStart() and @ref setEnd() or with the consolidated
     * @ref setStartEnd().
     *
     * The Part has a @ref DisplayParameters object associated with it which
     * may be used by an application to redraw the Part on screen (this use is
     * optional). If you do use it, the Part @ref DisplayParams should
     * superceed any @ref Phrase @ref DisplayParams.
     *
     * @sect Command classes
     *
     * Use the following command classes to manipute this object in a undo/redo
     * environment.
     *
     *     @li @ref TSE3::Cmd::Part_SetInfo
     *     @li @ref TSE3::Cmd::Part_SetPhrase
     *     @li @ref TSE3::Cmd::Part_Move
     *     @li @ref TSE3::Cmd::Track_Snip
     *     @li @ref TSE3::Cmd::Track_Glue
     *     @li @ref TSE3::Cmd::Track_RemovePart
     *
     * @short   A placement of a Phrase in a Track
     * @author  Pete Goodliffe
     * @version 3.00
     * @see     MidiEvent
     * @see     Phrase
     * @see     PhraseEdit
     */
    class Part : public Playable,
                 public Listener<PhraseListener>,
                 public Listener<MidiFilterListener>,
                 public Listener<MidiParamsListener>,
                 public Listener<DisplayParamsListener>,
                 public Serializable,
                 public Notifier<PartListener>
    {
        public:

            /**
             * Creates a Part that uses no @ref Phrase. Set the @ref Phrase
             * with the @ref setPhrase method.
             *
             * The start and end points are set to a default. Set them with
             * @ref setStart and @ref setEnd.
             */
            Part();

            /**
             * Creates a Part that uses no @ref Phrase and the given start
             * and end points.
             */
            Part(Clock start, Clock end);

            Part(const Part &p);
            virtual ~Part();

            Part &operator=(const Part &);

            /**
             * @ref MidiFilter that affects how @ref MidiEvents are
             * produced by this Part.
             *
             * @return The Part's @ref MidiFilter object
             */
            MidiFilter *filter();

            /**
             * The Part parameters that affects how @ref MidiEvents are
             * produced by this Part.
             *
             * @return The Part's @ref MidiParams object
             */
            MidiParams *params();

            /**
             * The display parameters.
             *
             * @return The Part's @ref DisplayParams object
             */
            DisplayParams *displayParams();

            /**
             * Returns the @ref Phrase this Part uses (or 0 if there is no
             * current @ref Phrase).
             *
             * @return The Part's @ref Phrase
             * @see    setPhrase
             */
            Phrase *phrase() const;

            /**
             * Sets the @ref Phrase this Part uses.
             *
             * The @ref Phrase must be contained in the correct @ref PhraseList
             * for this operation to work. If the Phrase subequently is
             * removed from a @ref PhraseList the Part's @ref Phrase pointer
             * is reset.
             *
             * You may specify a value of 0 for "use no @ref Phrase".
             *
             * @see phrase
             * @throws PartError
             */
            void setPhrase(Phrase *p);

            /**
             * Returns a pointer to the parent @ref Track that this
             * Part has been inserted into. If this Part has not been
             * inserted in a @ref Track, this method returns zero.
             *
             * @return @ref Track this Part is inserted in
             */
            Track *parent() const;

            /**
             * Returns the start time of this Part.
             *
             * This is meerly held for the convenience of the parent and
             * is not used by the Part itself. In particular, it does not alter
             * the relative times of the MidiEvents produced through the
             * Playable interface: they remain relative to time zero.
             *
             * @return Part's start time
             * @see    end
             * @see    setStart
             */
            Clock start() const;

            /**
             * Sets the start time of this Part.
             *
             * If the Part is inserted in a @ref Track then the end time cannot
             * be changed to before the start time.
             *
             * Note that if the Part is in a @ref Track and the change would
             * cause an exception to be thrown by the @ref Track's insert
             * method then that exception will propagate from this method.
             * However you can be assured that if this happens the Part will be
             * left with times set as they were when you called the method.
             *
             * @param  c      New start time
             * @see    start
             * @see    setStartEnd
             * @throws PartError
             * @throws TrackError
             */
            void setStart(Clock c);

            /**
             * Returns the end time of this Part.
             *
             * This is meerly held for the convenience of the parent and
             * is not used by the Part itself.
             *
             * @return Part's end time
             * @see    start
             * @see    setEnd
             */
            Clock end() const;

            /**
             * Sets the end time of this Part.
             *
             * If the Part is inserted in a @ref Track then the end time cannot
             * be changed to before the start time.
             *
             * Note that if the Part is in a @ref Track and the change would
             * cause an exception to be thrown by the @ref Track's insert
             * method then that exception will propagate from this method.
             * However you can be assured that if this happens the Part will be
             * left with times set as they were when you called the method.
             *
             * @param  c      New end time
             * @see    end
             * @see    setStartEnd
             * @throws PartError
             * @throws TrackError
             */
            void setEnd(Clock c);

            /**
             * Sets the start and end times of this Part.
             *
             * You may wish to use this when the Part is inserted in a
             * @ref Track and you want to move the Part in such a way
             * that calling @ref setStart or @ref setEnd first would throw
             * an exception.
             *
             * Note that if the Part is in a @ref Track and the change would
             * cause an exception to be thrown by the @ref Track's insert
             * method then that exception will propagate from this method.
             * However you can be assured that if this happens the Part will be
             * left with times set as they were when you called the method.
             *
             * @param  start  New start time
             * @param  end    New end time
             * @see    setStart
             * @see    setEnd
             * @throws PartError
             * @throws TrackError
             */
            void setStartEnd(Clock start, Clock end);

            /**
             * Returns the repeat time of this Part.
             *
             * A repeat time of zero means no repeat.
             *
             * @return Repeat time value
             * @see    setRepeat
             */
            Clock repeat() const;

            /**
             * Sets the repeat time of this Part.
             *
             * @param r New repeat time value
             * @see   repeat
             */
            void setRepeat(Clock r);

            /**
             * @reimplemented
             */
            virtual void Notifier_Deleted(Phrase *phrase);

            /**
             * @reimplemented
             */
            virtual void Phrase_Reparented(Phrase *);

            /**
             * @reimplemented
             */
            virtual PlayableIterator *iterator(Clock index);

            /**
             * @reimplemented
             */
            virtual Clock lastClock() const;

            /**
             * @reimplemented
             */
            virtual void save(std::ostream &o, int i) const;

            /**
             * @reimplemented
             */
            virtual void load(std::istream &in, SerializableLoadInfo &info);

            /**
             * @reimplemented
             */
            virtual void MidiFilter_Altered(MidiFilter *, int what);

            /**
             * @reimplemented
             */
            virtual void MidiParams_Altered(MidiParams *, int what);

            /**
             * @reimplemented
             */
            virtual void DisplayParams_Altered(DisplayParams *);

            /**
             * The @ref Track class is a friend so that it can access the
             * @ref setParentTrack() method.
             */
            friend class Track;

        private:

            /**
             * This method is called by the @ref Track class alone. It is used
             * to set the parent @ref Track pointer, _track. This will be set
             * to the parent's pointer, or to zero if the Part is removed
             * from the @ref Track.
             *
             * This is the only private member the @ref Track class accesses.
             *
             * @param parent @ref Track object that this Part has been inserted
             *               into.
             */
            void setParentTrack(Track *parent);

            class PartImpl *pimpl;
    };
}

#endif