pianod2
multisource multiuser scriptable networked music player
Public Member Functions | Static Public Member Functions | List of all members
PianodAlbum Class Referenceabstract

Base class for albums, these are also MusicThingies and artists. More...

#include <musictypes.h>

Inheritance diagram for PianodAlbum:
Inheritance graph
[legend]
Collaboration diagram for PianodAlbum:
Collaboration graph
[legend]

Public Member Functions

virtual const std::string & albumId (void) const =0
 Item's album ID. More...
 
virtual const std::string id (void) const override
 Primary ID is album ID. More...
 
virtual const std::string id (MusicThingie::Type type) const override
 Return the complete ID when used in a specific context. More...
 
virtual const std::string & internalId (MusicThingie::Type type) const override
 Return the inner ID when used in a specific context. More...
 
virtual const std::string & name (void) const override
 Return the most specific name of this, whatever type it is. More...
 
virtual Type type (void) const override
 Return the type letter for a thingie. More...
 
virtual Football::ThingietransmitCommon (Football::Thingie &recipient) const override
 Typecode for album type. More...
 
virtual PianodConnectiontransmitPrivate (PianodConnection &recipient) const override
 Transmit the thingie's user-specific data on a connection. More...
 
virtual Parsnip::Data serialize () const override
 Assemble the thingie's data for JSON tranmission. More...
 
virtual void serializePrivate (Parsnip::Data &, const User *user) const override
 Add the thingie's user-specific data for JSON transmission. More...
 
virtual bool matches (const Filter &filter) const override
 Check if a filter matches this item. More...
 
virtual PianodArtistasArtist () override
 
virtual const PianodArtistasArtist () const override
 
virtual PianodAlbumasAlbum () override final
 
virtual const PianodAlbumasAlbum () const override final
 
virtual const std::string & albumTitle (void) const =0
 
virtual const std::string & coverArtUrl (void) const =0
 
virtual bool compilation () const
 
virtual bool operator== (const std::string &compare) const override
 Is album a compilation? More...
 
virtual bool operator== (const MusicThingie &compare) const override
 Compare artist's name to that of an artist/album/song. More...
 
- Public Member Functions inherited from PianodArtist
virtual const std::string & artistId (void) const =0
 Item's artist ID. More...
 
virtual const std::string & artist (void) const =0
 Get artist name. More...
 
- Public Member Functions inherited from MusicThingie
 MusicThingie (void)
 When allocated, use count starts at 1 and the object is put in the release pool, justifying its existence. More...
 
bool isPrimary (void) const
 
bool isSuggestion (void) const
 
bool isSeed (void) const
 
bool isPlaylist (void) const
 
bool isSong (void) const
 
bool isAlbum (void) const
 
bool isArtist (void) const
 
bool isValidType (void) const
 
Type primaryType (void) const
 
virtual bool canQueue () const
 Indicate if specific item can be queued/requested. More...
 
virtual PianodSongasSong ()
 
virtual PianodPlaylistasPlaylist ()
 
virtual const PianodSongasSong () const
 
virtual const PianodPlaylistasPlaylist () const
 
std::string operator() (void) const
 
void retain (void) const
 Claim an instance. More...
 
void release (void)
 Abandon an instance. More...
 
int getUseCount (void) const
 
virtual OwnershipparentOwner (void) const
 Defer the ownership to the source. More...
 
virtual Media::Source *const source (void) const =0
 MediaSource from which this thingie originates. More...
 
void serializeCommon (Parsnip::Data &) const
 Insert common items into the serialization dictionary. More...
 
bool operator!= (const std::string &compare)
 
bool operator!= (const MusicThingie &compare)
 
virtual SongList songs ()
 Retrieve a list of requestable songs applicable to this thingie. More...
 
- Public Member Functions inherited from SubordinateOwnership
virtual bool isOwnedBy (const User *user) const override
 
virtual bool hasPermission (const User *user, Action action) const override
 
- Public Member Functions inherited from Ownership
bool isVisibleBy (const User *user) const
 
bool isUsableBy (const User *user) const
 
bool isDecendableBy (const User *user) const
 
bool isReadableBy (const User *user) const
 
bool isEditableBy (const User *user) const
 

Static Public Member Functions

static Type typetype (void)
 Typecode for album objects. More...
 
- Static Public Member Functions inherited from PianodArtist
static Type typetype (void)
 Typecode for artist objects. More...
 
- Static Public Member Functions inherited from MusicThingie
static std::string TypeName (Type type)
 Get the type name of a music thingie. More...
 
static Type TypeFromName (const std::string &name)
 
static constexpr bool isPrimary (Type t)
 
static constexpr bool isSuggestion (const Type t)
 
static constexpr bool isSeed (const Type t)
 
static constexpr bool isPlaylist (const Type t)
 
static constexpr bool isSong (const Type t)
 
static constexpr bool isAlbum (const Type t)
 
static constexpr bool isArtist (const Type t)
 
static constexpr bool isValidType (const Type t)
 
static Type primaryType (const Type t)
 

Additional Inherited Members

- Public Types inherited from MusicThingie
enum class  Type : char {
  Playlist = 'p' , Artist = 'a' , Album = 'l' , Song = 's' ,
  PlaylistSuggestion = 'e' , ArtistSuggestion = 't' , AlbumSuggestion = 'b' , SongSuggestion = 'n' ,
  PlaylistSeed = 'y' , ArtistSeed = 'd' , AlbumSeed = 'u' , SongSeed = 'g' ,
  SongRating = 'i'
}
 
- Public Types inherited from Ownership
enum class  Type {
  DISOWNED , PRIVATE , SHARED , PUBLISHED ,
  PUBLIC
}
 Access levels for an object. More...
 
enum class  Action { SEE , USE , READ , ALTER }
 Access actions for an object. More...
 
- Protected Member Functions inherited from MusicThingie
virtual ~MusicThingie (void)
 

Detailed Description

Base class for albums, these are also MusicThingies and artists.

Member Function Documentation

◆ albumId()

virtual const std::string& PianodAlbum::albumId ( void  ) const
pure virtual

Item's album ID.

Implemented in MusicLibrary::Song, MusicLibrary::Album, EncapsulatedSong, and EncapsulatedAlbum.

Here is the caller graph for this function:

◆ albumTitle()

virtual const std::string& PianodAlbum::albumTitle ( void  ) const
pure virtual

Implemented in MusicLibrary::Song, MusicLibrary::Album, EncapsulatedSong, and EncapsulatedAlbum.

Here is the caller graph for this function:

◆ asAlbum() [1/2]

virtual const PianodAlbum* PianodAlbum::asAlbum ( ) const
inlinefinaloverridevirtual

Reimplemented from MusicThingie.

◆ asAlbum() [2/2]

virtual PianodAlbum* PianodAlbum::asAlbum ( )
inlinefinaloverridevirtual

Reimplemented from MusicThingie.

◆ asArtist() [1/2]

virtual const PianodArtist* PianodAlbum::asArtist ( ) const
inlineoverridevirtual

Reimplemented from PianodArtist.

Reimplemented in MusicLibrary::Song.

Here is the call graph for this function:

◆ asArtist() [2/2]

virtual PianodArtist* PianodAlbum::asArtist ( )
inlineoverridevirtual

Reimplemented from PianodArtist.

Reimplemented in MusicLibrary::Song.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compilation()

virtual bool PianodAlbum::compilation ( ) const
inlinevirtual

Reimplemented in MusicLibrary::Song, and MusicLibrary::Album.

Here is the caller graph for this function:

◆ coverArtUrl()

virtual const std::string& PianodAlbum::coverArtUrl ( void  ) const
pure virtual

Implemented in MusicLibrary::Song, MusicLibrary::Album, EncapsulatedSong, and EncapsulatedAlbum.

Here is the caller graph for this function:

◆ id() [1/2]

const std::string PianodAlbum::id ( MusicThingie::Type  type) const
overridevirtual

Return the complete ID when used in a specific context.

Reimplemented from PianodArtist.

Reimplemented in PianodSong.

Here is the call graph for this function:

◆ id() [2/2]

const std::string PianodAlbum::id ( void  ) const
overridevirtual

Primary ID is album ID.

Reimplemented from PianodArtist.

Reimplemented in PianodSong.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ internalId()

const std::string & PianodAlbum::internalId ( MusicThingie::Type  type) const
overridevirtual

Return the inner ID when used in a specific context.

Reimplemented from PianodArtist.

Reimplemented in PianodSong.

Here is the call graph for this function:

◆ matches()

bool PianodAlbum::matches ( const Filter filter) const
overridevirtual

Check if a filter matches this item.

Reimplemented from PianodArtist.

Reimplemented in PianodSong.

Here is the call graph for this function:

◆ name()

virtual const std::string& PianodAlbum::name ( void  ) const
inlineoverridevirtual

Return the most specific name of this, whatever type it is.

Reimplemented from PianodArtist.

Reimplemented in PianodSong.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator==() [1/2]

bool PianodAlbum::operator== ( const MusicThingie compare) const
overridevirtual

Compare artist's name to that of an artist/album/song.

Returns
True/false. Uses fuzzy logic, skipping 'a'/'an'/'the' and adjusting for /first last/ to /last, first/

Reimplemented from PianodArtist.

Reimplemented in PianodSong.

Here is the call graph for this function:

◆ operator==() [2/2]

bool PianodAlbum::operator== ( const std::string &  compare) const
overridevirtual

Is album a compilation?

Reimplemented from PianodArtist.

Reimplemented in PianodSong.

Here is the call graph for this function:

◆ serialize()

Parsnip::Data PianodAlbum::serialize ( ) const
overridevirtual

Assemble the thingie's data for JSON tranmission.

Reimplemented from PianodArtist.

Reimplemented in PianodSong.

Here is the call graph for this function:

◆ serializePrivate()

void PianodAlbum::serializePrivate ( Parsnip::Data ,
const User user 
) const
overridevirtual

Add the thingie's user-specific data for JSON transmission.

Reimplemented from PianodArtist.

Reimplemented in Filesystem::Song, and PianodSong.

Here is the call graph for this function:

◆ transmitCommon()

Football::Thingie & PianodAlbum::transmitCommon ( Football::Thingie recipient) const
overridevirtual

Typecode for album type.

Reimplemented from PianodArtist.

Reimplemented in PianodSong.

Here is the call graph for this function:

◆ transmitPrivate()

PianodConnection & PianodAlbum::transmitPrivate ( PianodConnection recipient) const
overridevirtual

Transmit the thingie's user-specific data on a connection.

Reimplemented from PianodArtist.

Reimplemented in Filesystem::Song, and PianodSong.

Here is the call graph for this function:

◆ type()

virtual Type PianodAlbum::type ( void  ) const
inlineoverridevirtual

Return the type letter for a thingie.

This is used as the first letter of the ID, so IDs can be routed to the appropriate dataset/handler.

Reimplemented from PianodArtist.

Reimplemented in PianodSong, EncapsulatedSong, and EncapsulatedAlbum.

Here is the caller graph for this function:

◆ typetype()

static Type PianodAlbum::typetype ( void  )
inlinestatic

Typecode for album objects.


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