Public Member Functions | |
Artist (const std::string &id="", const std::string &type="", const std::string &name="", const std::string &sortName="") | |
Constructor. | |
virtual | ~Artist () |
Destructor. | |
std::string | getType () const |
Returns the artist's type. | |
void | setType (const std::string &type) |
Sets the artist's type. | |
std::string | getName () const |
Returns the artist's name. | |
void | setName (const std::string &name) |
Sets the artist's name. | |
std::string | getSortName () const |
Returns the artist's sort name. | |
void | setSortName (const std::string &sortName) |
Sets the artist's sort name. | |
std::string | getDisambiguation () const |
Returns the disambiguation attribute. | |
void | setDisambiguation (const std::string &disambiguation) |
Sets the disambiguation attribute. | |
std::string | getUniqueName () const |
Returns a unique artist name (using disambiguation). | |
std::string | getBeginDate () const |
Returns the birth/foundation date. | |
void | setBeginDate (const std::string &dateStr) |
Sets the begin/foundation date. | |
std::string | getEndDate () const |
Get the death/dissolving date. | |
void | setEndDate (const std::string &dateStr) |
Sets the death/dissolving date. | |
ReleaseList & | getReleases () |
Returns a list of releases from this artist. | |
int | getNumReleases () const |
Returns number of releases. | |
Release * | getRelease (int index) |
Returns an release specified by index. | |
void | addRelease (Release *release) |
Adds a release to this artist's list of releases. | |
int | getReleasesOffset () const |
Returns the offset of the release list. | |
void | setReleasesOffset (const int offset) |
Sets the offset of the release list. | |
int | getReleasesCount () const |
Returns the number of existing releases. | |
void | setReleasesCount (const int count) |
Sets the count of the release list. | |
ArtistAliasList & | getAliases () |
Returns the list of aliases for this artist. | |
int | getNumAliases () const |
Returns number of aliases. | |
ArtistAlias * | getAlias (int index) |
Returns alias specified by index. | |
void | addAlias (ArtistAlias *alias) |
Adds an alias for this artist. | |
Static Public Attributes | |
static const std::string | TYPE_PERSON |
static const std::string | TYPE_GROUP |
Artists in MusicBrainz can have a type. Currently, this type can be either Person or Group for which the following URIs are assigned:
Use the Artist::TYPE_PERSON and Artist::TYPE_GROUP constants for comparison.
MusicBrainz::Artist::Artist | ( | const std::string & | id = "" , |
|
const std::string & | type = "" , |
|||
const std::string & | name = "" , |
|||
const std::string & | sortName = "" | |||
) |
Constructor.
id | a string containing an absolute URI | |
type | a string containing an absolute URI | |
name | a string containing the artist's name | |
sortName | a string containing the artist's sort name |
virtual MusicBrainz::Artist::~Artist | ( | ) | [virtual] |
Destructor.
std::string MusicBrainz::Artist::getType | ( | ) | const |
Returns the artist's type.
void MusicBrainz::Artist::setType | ( | const std::string & | type | ) |
Sets the artist's type.
type | a string containing an absolute URI |
std::string MusicBrainz::Artist::getName | ( | ) | const |
Returns the artist's name.
void MusicBrainz::Artist::setName | ( | const std::string & | name | ) |
Sets the artist's name.
name | a string containing the artist's name |
std::string MusicBrainz::Artist::getSortName | ( | ) | const |
Returns the artist's sort name.
The sort name is the artist's name in a special format which is better suited for lexicographic sorting. The MusicBrainz style guide specifies this format.
void MusicBrainz::Artist::setSortName | ( | const std::string & | sortName | ) |
Sets the artist's sort name.
sortName,: | a string containing the artist's sort name |
std::string MusicBrainz::Artist::getDisambiguation | ( | ) | const |
Returns the disambiguation attribute.
This attribute may be used if there is more than one artist with the same name. In this case, disambiguation attributes are added to the artists' names to keep them apart.
For example, there are at least three bands named 'Vixen'. Each band has a different disambiguation in the MusicBrainz database, like 'Hip-hop' or 'all-female rock/glam band'.
void MusicBrainz::Artist::setDisambiguation | ( | const std::string & | disambiguation | ) |
Sets the disambiguation attribute.
disambiguation | a disambiguation string |
std::string MusicBrainz::Artist::getUniqueName | ( | ) | const |
Returns a unique artist name (using disambiguation).
This method returns the artist name together with the disambiguation attribute in parenthesis if it exists. Example: 'Vixen (Hip-hop)'.
std::string MusicBrainz::Artist::getBeginDate | ( | ) | const |
Returns the birth/foundation date.
The definition of the begin date depends on the artist's type. For persons, this is the day of birth, for groups it is the day the group was founded.
The returned date has the format "YYYY", "YYYY-MM", or "YYYY-MM-DD", depending on how much detail is known.
void MusicBrainz::Artist::setBeginDate | ( | const std::string & | dateStr | ) |
std::string MusicBrainz::Artist::getEndDate | ( | ) | const |
Get the death/dissolving date.
The definition of the end date depends on the artist's type. For persons, this is the day of death, for groups it is the day the group was dissolved.
void MusicBrainz::Artist::setEndDate | ( | const std::string & | dateStr | ) |
Sets the death/dissolving date.
dateStr | a string containing a date |
ReleaseList& MusicBrainz::Artist::getReleases | ( | ) |
Returns a list of releases from this artist.
This may also include releases where this artist isn't the main artist but has just contributed one or more tracks (aka VA-Releases).
int MusicBrainz::Artist::getNumReleases | ( | ) | const |
Returns number of releases.
This is equivalent to getReleases()
.size()
Release* MusicBrainz::Artist::getRelease | ( | int | index | ) |
Returns an release specified by index.
This is equivalent to getReleases()
[index]
void MusicBrainz::Artist::addRelease | ( | Release * | release | ) |
int MusicBrainz::Artist::getReleasesOffset | ( | ) | const |
Returns the offset of the release list.
This is used if the track list is incomplete (ie. the web service only returned part of the tracks on this release). Note that the offset value is zero-based, which means track 0 is the first track.
void MusicBrainz::Artist::setReleasesOffset | ( | const int | offset | ) |
Sets the offset of the release list.
offset | an integer containing the offset |
int MusicBrainz::Artist::getReleasesCount | ( | ) | const |
Returns the number of existing releases.
This may or may not match with the number of elements that getReleases and getNumReleases returns. If the count is higher than the list, it indicates that the list is incomplete.
void MusicBrainz::Artist::setReleasesCount | ( | const int | count | ) |
Sets the count of the release list.
count | an integer containing the count |
ArtistAliasList& MusicBrainz::Artist::getAliases | ( | ) |
int MusicBrainz::Artist::getNumAliases | ( | ) | const |
Returns number of aliases.
This is equivalent to getAliases()
.size()
ArtistAlias* MusicBrainz::Artist::getAlias | ( | int | index | ) |
Returns alias specified by index.
This is equivalent to getAliases()
[index]
void MusicBrainz::Artist::addAlias | ( | ArtistAlias * | alias | ) |
const std::string MusicBrainz::Artist::TYPE_PERSON [static] |
const std::string MusicBrainz::Artist::TYPE_GROUP [static] |