File: tracklist_op.cpp

package info (click to toggle)
libofa 0.9.3-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,920 kB
  • ctags: 460
  • sloc: cpp: 24,470; sh: 8,366; makefile: 45; ansic: 14
file content (54 lines) | stat: -rw-r--r-- 980 bytes parent folder | download | duplicates (8)
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
/* ------------------------------------------------------------------

   libofa -- the Open Fingerprint Architecture library

   Copyright (C) 2006 MusicIP Corporation
   All rights reserved.

-------------------------------------------------------------------*/
// FILE: "tracklist_op.cpp"
// MODULE: Implementation for class TrackList
// AUTHOR: Stephen Pope
// DATE CREATED: 01/12/06


#include "trackdata_op.h"
#include "tracklist_op.h"

// Constructor

TrackList_op::TrackList_op() 
{ 
	NumFrames = 0; 
	BaseFr = 0;
	LastFr = 0;
}

// Delete the list of frames on delete

TrackList_op::~TrackList_op() 
{
	TrackFrame_op* frm = BaseFr;
	while (frm != 0) {
		TrackFrame_op* next = frm->getNext();
		delete frm;
		frm = next;
	}
}

// Element add/remove

void 
TrackList_op::Add(TrackFrame_op* td) 
{
	if (NumFrames == 0) {
		BaseFr = td;
		LastFr = td;
	} else {
		LastFr->setNext(td);
		LastFr = td;
	}
	NumFrames++;
}