-
Notifications
You must be signed in to change notification settings - Fork 0
/
Header.h
153 lines (148 loc) · 2.62 KB
/
Header.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
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
#pragma once
#include <iostream>
#include <windows.h>
#include <stack>
#include <queue>
#include <fstream>
#include <list>
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
#include <boost/serialization/serialization.hpp>
#include <boost/serialization/access.hpp>
#define TABLE_SIZE = 100;
using namespace std;
class Song {
private:
string name;
string artist;
float duration;
float energy;
float key;
float loudness;
float speechiness;
float acousticness;
float instrumentalness;
float liveness;
float tempo;
public:
Song(const string& n, const string& a) : name(n), artist(a), duration(0), energy(0), key(0), loudness(0), speechiness(0), acousticness(0), instrumentalness(0), liveness(0), tempo(0) {}
void setName(string n)
{
name = n;
}
void setArtist(const string& a)
{
artist = a;
}
void setDuration(float dur)
{
duration = dur;
}
void setEnergy(float en)
{
energy = en;
}
void setKey(float k)
{
key = k;
}
void setLoudness(float loud)
{
loudness = loud;
}
void setSpeechiness(float spch)
{
speechiness = spch;
}
void setAcousticness(float ac)
{
acousticness = ac;
}
void setInstrumentalness(float instr)
{
instrumentalness = instr;
}
void setLiveness(float live)
{
liveness = live;
}
void setTempo(float tmp)
{
tempo = tmp;
}
string getName()
{
return name;
}
string getArtist()
{
return artist;
}
float getDuration()
{
return duration;
}
float getEnergy()
{
return energy;
}
float getKey()
{
return key;
}
float getLoudness()
{
return loudness;
}
float getSpeechiness()
{
return speechiness;
}
float getAcousticness()
{
return acousticness;
}
float getInstrumentalness()
{
return instrumentalness;
}
float getLiveness()
{
return liveness;
}
float getTempo()
{
return tempo;
}
void displayInfo();
};
class User {
public:
string username;
string password;
/* PlayList* FirstPL;
stack<Song*> ListeningHistory;
priority_queue<int> MostListenedToSongs;
stack<Song*> LikedSongs;*/
User(string usern, string passw);
User();
private:
friend class boost::serialization::access;
template <class Archive>
void serialize(Archive& ar, const unsigned int version) {
ar& username;
ar& password;
}
};
class UserHashTable {
vector<list<User>> HashTable;
void HashFunction(User u1);
public:
};
class Menu {
public:
void SignUpPrompt();
void LoginPrompt();
void Welcome();
void Logo();
};