This file is indexed.

/usr/include/tse3/Track.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
/*
 * @(#)Track.h 3.00 17 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_TRACK_H
#define TSE3_TRACK_H

#include "tse3/listen/Track.h"

#include "tse3/Notifier.h"
#include "tse3/Playable.h"
#include "tse3/Serializable.h"
#include "tse3/listen/Part.h"
#include "tse3/listen/DisplayParams.h"

#include <string>
#include <cstddef>

namespace TSE3
{
    class Song;
    class MidiFilter;
    class MidiParams;

    /**
     * A Track is a subunit of a @ref Song. Many Tracks can exist in a @ref Song
     * and are played concurrently. You can imagine them to correspond to the
     * different members of a band or orchestra.
     *
     * Tracks contain a number of parameters that effect the way the musical
     * data they contain is produced.
     *
     * Tracks contain @ref Parts. They 'own' them, and so a @ref Part's lifetime
     * is bound to it's parent Track. @ref Parts are created by external
     * agents - the user of the TSE3 library. Each @ref Part has a well defined
     * start and end time, and the @ref Part objects in the Track may not
     * overlap.
     *
     * @sect Command classes
     *
     * Use the following command classes to manipute this object in a undo/redo
     * environment.
     *
     *     @li @ref TSE3::Cmd::Track_SetInfo
     *     @li @ref TSE3::Cmd::Track_Snip
     *     @li @ref TSE3::Cmd::Track_Glue
     *     @li @ref TSE3::Cmd::Track_RemovePart
     *     @li @ref TSE3::Cmd::Track_Sort
     *     @li @ref TSE3::Cmd::Song_InsertTrack
     *     @li @ref TSE3::Cmd::Song_RemoveTrack
     *     @li @ref TSE3::Cmd::Song_SoloTrack
     *     @li @ref TSE3::Cmd::Part_Move
     *
     * @short   Represents the concurrent musical sections of a Song
     * @author  Pete Goodliffe
     * @version 3.00
     * @see     Song
     * @see     Part
     */
    class Track : public Listener<PartListener>,
                  public Listener<DisplayParamsListener>,
                  public Playable,
                  public Serializable,
                  public Notifier<TrackListener>
    {

        public:

            Track();
            virtual ~Track();

            /**
             * Read the Track title.
             *
             * @return Track's title string
             * @see    setTitle
             */
            const std::string &title() const;

            /**
             * Set the Track title.
             *
             * @param s New title string
             * @see   title
             */
            void setTitle(const std::string &s);

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

            /**
             * The Track parameters.
             *
             * @return Track's @ref MidiParams
             */
            MidiParams *params();

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

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

            /**
             * The number of @ref Parts in this Track.
             *
             * @return The number of @ref Parts
             */
            size_t size() const;

            /**
             * Return the @ref Part at the given index
             *
             * The value returned for an index that is out of range is
             * undefined. The @ref size method describes the valid
             * values.
             *
             * @param  n Index
             * @return @ref Part at this index
             */
            Part *operator[](size_t n) const;

            /**
             * Inserts a @ref Part between the given times. The Track 'owns'
             * this @ref Part and will delete it when it is deleted.
             *
             * If the @ref Part cannot be inserted (due to @ref Part overlap)
             * a @ref TrackError will be thrown.
             *
             * @param  start  @ref Part's start time
             * @param  end    @ref Part's end time
             * @throws TrackError
             * @return New @ref Part. If several @ref Part objects are inserted
             *         (because @p action is @ref Part::Under) the pointer
             *         to the first @ref Part will be returned.
             */
            Part *insert(Clock start, Clock end);

            /**
             * Inserts the given @ref Part into the Track at the @ref Part's
             * times.
             *
             * This causes the @ref Part to be 'owned' by the Track, it will
             * be deleted when the Track is deleted.
             *
             * You may not pass a @ref Part that has already been inserted
             * into a different (or indeed the same) Track (the @ref TrackError
             * exception will be thrown).
             *
             * If the @ref Part cannot be inserted (due to @ref Part overlap)
             * a @ref TrackError will be thrown.
             *
             * If the @ref Part has invalid times (i.e. start after end)
             * then a @ref TrackError will be thrown.
             *
             * @param  New @ref Part to insert
             * @throws TrackError
             */
            void insert(Part *part);

            /**
             * Remove the given @ref Part.
             *
             * The @ref Part will not be deleted, it is no longer considered
             * to be 'owned' by the Track.
             *
             * If the @ref Part is not in the Track then nothing will
             * happen.
             *
             * @param part @ref Part to remove - you must now delete it
             */
            void remove(Part *part);

            /**
             * Remove the @ref Part with the given index.
             *
             * The @ref Part will not be deleted, it is no longer considered
             * to be 'owned' by the Track.
             *
             * If the index is invalid then nothing will happen.
             *
             * @param part @ref Part to remove - you must now delete it
             */
            void remove(size_t index);

            /**
             * Returns the number of @ref Part objects (or bits of @ref Part
             * objects) that exist in the Track between the given times.
             *
             * @param   start Start of time zone
             * @param   end   End of time zone
             * @returns Number of @ref Part objects between times
             */
            size_t numPartsBetween(Clock start, Clock end);

            /**
             * This less than operation compares the Tracks' title strings.
             */
            int operator<(const Track &t) const;

            /**
             * Returns the index of the first @ref Part that occurs after
             * the given @ref Clock.
             *
             * @param  c Clock value to search for
             * @return Index of first Part at or after this time.
             *         If past the end of the Track object then returns
             *         'size'.
             */
            size_t index(Clock c) const;

            /**
             * Returns the index of the specified @ref Part (or size if not
             * in this Track).
             *
             * @param  part Pointer to @refPartTrack
             * @return The index of the specified @ref Part, or @ref size()
             */
            size_t index(Part *part) const;

            /**
             * @reimplemented
             */
            virtual void Notifier_Deleted(Part *);

            /**
             * @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 DisplayParams_Altered(DisplayParams *);

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

        private:

            Track &operator=(const Track &);
            Track(const Track &);

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

            /**
             * A private method to insert a @ref Part into the @ref parts
             * vector. This will also set the @ref Part's parent Track and
             * attach the Track to this @ref Part.
             *
             * The @ref Part passed must be valid to be placed in the vector
             * (i.e. it must not cause an overlap, be in any other Track).
             *
             * This private method is called by other insert methods.
             *
             * The notification for Part insertion is not performed.
             *
             * @param part @ref Part to insert
             */
            void prvInsertPart(Part *part);

            class TrackImpl *pimpl;
    };
}

#endif