1
/* cdrdao - write audio CD-Rs in disc-at-once mode
3
* Copyright (C) 1998-2001 Andreas Mueller <andreas@daneb.de>
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24
#include "TrackDataList.h"
25
#include "TrackData.h"
27
TrackDataList::TrackDataList()
35
void TrackDataList::append(TrackData *a)
37
Entry *ent = new Entry;
52
unsigned long TrackDataList::length() const
54
unsigned long len = 0;
57
for (run = list_; run != NULL; run = run->next)
58
len += run->data->length();
63
void TrackDataList::clear()
67
while (list_ != NULL) {
81
const TrackData *TrackDataList::first() const
83
if ((((TrackDataList *)this)->iterator_ = list_) != NULL)
84
return iterator_->data;
89
const TrackData *TrackDataList::next() const
91
if (iterator_ == NULL ||
92
(((TrackDataList *)this)->iterator_ = iterator_->next) == NULL)
95
return iterator_->data;