-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlaylist.h
43 lines (30 loc) · 966 Bytes
/
Playlist.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
#include <iostream>
#include <string>
#include "Song.h"
#include <vector>
class Playlist
{
public:
Playlist();
Playlist(std::string playlistName);
void setPlaylistName(std::string playlistName);
std::string getPlaylistName();
void addSong(Song &);
void deleteSong(Song &);
Playlist intersect(Playlist & );
Playlist Merge(std:: vector<Playlist> &);
void play();
void setMode(char mode);
friend std::ostream& operator<<(std::ostream& os, const Playlist& list);
friend std::ofstream& operator<<(std::ofstream& os, const Playlist& list);
friend std::istream& operator>>(std::istream& is, Playlist& list);
friend std::fstream& operator>>(std::fstream& is, Playlist& list);
friend Playlist operator+ (Playlist&, Song&);
friend Playlist operator+ (Playlist&, Playlist&);
friend Playlist operator- (Playlist&, Song&);
private:
std::string playlistName;
std::vector<Song> playlist;//holds list of song that belongs to playlist
static char mode;
int location;
};