#include <song.hpp>
Object that represents a Song in our system. A Song contains the URL of the song, along with who submitted the song, and thier taste value
◆ Song() [1/2]
Default constructor. Creates an object with 0 taste, a user of Rick Astley, with a URL to his #1 hit song
◆ Song() [2/2]
Song::Song |
( |
std::string |
url, |
|
|
std::string |
user |
|
) |
| |
|
inline |
Creates a song with the given URL assiciated with the given user
- Parameters
-
url | the URL of the song |
user | The user who submitted the URL |
◆ getTaste()
int Song::getTaste |
( |
void |
| ) |
|
|
inline |
Returns the taste of the user associated with this song. This taste may be a stale value, as it may not be the current value in the database and is only periodically updated
- Returns
- taste of the associated user
◆ getUrl()
std::string Song::getUrl |
( |
void |
| ) |
|
|
inline |
Returns the URL of the song
◆ getUser()
std::string Song::getUser |
( |
void |
| ) |
|
|
inline |
Returns the user assiciated with the song
◆ setTaste()
void Song::setTaste |
( |
int |
t | ) |
|
|
inline |
Sets the taste of the user associated with this song
- Parameters
-
t | The taste value of the user |
The documentation for this class was generated from the following file: