-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSongLinked.h
67 lines (39 loc) · 1.12 KB
/
SongLinked.h
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
//
// Created by Ryan King on 12/9/18.
//
#ifndef AUTODJ_SONGLINKED_H
#define AUTODJ_SONGLINKED_H
#include "LinkedNode.h"
#include "Song.h"
#include "List.h"
#include <iostream>
class SongLinked : public List {
private:
LinkedNode* front;
LinkedNode* end;
int currItemCount=0;
SongLinked(const SongLinked& arrayListToCopy);
SongLinked& operator=(const SongLinked& arrayListToCopy);
public:
SongLinked();
//Destructor
~SongLinked();
void addSong(Song* songToAdd);
void insertAt(Song* itemToAdd, int index);
void insertAtEnd(Song* itemToAdd);
void insertAtFront(Song* itemToAdd);
Song* removeValueAtEnd();
std::string toString();
bool isEmpty();
int itemCount();
void clearList();
std::string findArtist(std::string artist);
int findSong(std::string title, std::string artist);
void removeSong(std::string title, std::string artist);
Song* removeValueAtFront();
Song* removeValueAt(int index);
Song* getValueAt(int index);
float calcDuration();
void addAlphabetical(Song* songToAdd);
};
#endif //AUTODJ_SONGLINKED_H