Sayonara Player
Classes | Public Types | Public Member Functions | List of all members
LastFM::ArtistMatch Class Reference

Classes

struct  ArtistDesc
 

Public Types

enum  Quality : uint8_t {
  Poor = 0,
  Well = 1,
  Very_Good = 2
}
 The Quality enum used to access the bin of interest. See ArtistMatch::get(Quality q)
 

Public Member Functions

 ArtistMatch (const QString &artist_name)
 
 ArtistMatch (const ArtistMatch &other)
 
bool isValid () const
 checks, if structure is valid. More...
 
bool operator== (const ArtistMatch &am) const
 Compares two ArtistMatch structures. More...
 
ArtistMatchoperator= (const ArtistMatch &other)
 
void add (const ArtistDesc &artist, double match)
 adds an artist string to the corresponding bin More...
 
QMap< ArtistDesc, double > get (Quality q) const
 get bin by quality More...
 
QString artistName () const
 get the corresponding artist name of the ArtistMatch structure More...
 
QString toString () const
 converts the artist match to string More...
 

Member Function Documentation

◆ add()

void LastFM::ArtistMatch::add ( const ArtistDesc artist,
double  match 
)

adds an artist string to the corresponding bin

Parameters
artistartist string
matchthe match value

◆ artistName()

QString LastFM::ArtistMatch::artistName ( ) const

get the corresponding artist name of the ArtistMatch structure

Returns
artist name

◆ get()

QMap<ArtistDesc, double> LastFM::ArtistMatch::get ( Quality  q) const

get bin by quality

Parameters
qquality. See ArtistMatch::Quality
Returns
the desired bin

◆ isValid()

bool LastFM::ArtistMatch::isValid ( ) const

checks, if structure is valid.

Returns
false, if all bins are empty. True else

◆ operator==()

bool LastFM::ArtistMatch::operator== ( const ArtistMatch am) const

Compares two ArtistMatch structures.

Parameters
amthe other ArtistMatch
Returns
true, if the artist string is the same. False else

◆ toString()

QString LastFM::ArtistMatch::toString ( ) const

converts the artist match to string

Returns
string representation