My Project
Public Member Functions | List of all members
Song Class Reference

#include <song.hpp>

Public Member Functions

 Song ()
 
 Song (std::string url, std::string user)
 
std::string getUrl (void)
 
std::string getUser (void)
 
int getTaste (void)
 
void setTaste (int t)
 

Detailed Description

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

Constructor & Destructor Documentation

◆ Song() [1/2]

Song::Song ( )
inline

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
urlthe URL of the song
userThe user who submitted the URL

Member Function Documentation

◆ 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
tThe taste value of the user

The documentation for this class was generated from the following file: