pianod2
multisource multiuser scriptable networked music player
Public Member Functions | List of all members
SongList Class Reference

A container for holding songs. More...

#include <retainedlist.h>

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

Public Member Functions

void mixedMerge (const SongList &adds)
 Randomly merge a songlist into another. More...
 
 RetainedList ()=default
 Default constructor. More...
 
 RetainedList (const this_type &list)
 Copy construct from list of same type. More...
 
 RetainedList (this_type &&list)
 Move construct from a list of the same type. More...
 
template<typename FromPointerType , class FromValueType = typename std::remove_pointer<FromPointerType>::type, typename = typename std::enable_if<std::is_base_of<ValueType, FromValueType>::value>::type>
 RetainedList (const RetainedList< FromPointerType > &list)
 Copy construct from another RetainedList whose value type is a subclass of our value type. More...
 
template<typename FromPointerType , class FromValueType = typename std::remove_pointer<FromPointerType>::type, typename = typename std::enable_if<std::is_base_of<ValueType, FromValueType>::value>::type>
 RetainedList (RetainedList< FromPointerType > &&list)
 Move construct from another RetainedList whose value type is a subclass of our value type. More...
 
- Public Member Functions inherited from RetainedList< PianodSong * >
 RetainedList ()=default
 Default constructor. More...
 
 RetainedList (const this_type &list)
 Copy construct from list of same type. More...
 
 RetainedList (this_type &&list)
 Move construct from a list of the same type. More...
 
 RetainedList (const RetainedList< FromPointerType > &list)
 Copy construct from another RetainedList whose value type is a subclass of our value type. More...
 
 RetainedList (RetainedList< FromPointerType > &&list)
 Move construct from another RetainedList whose value type is a subclass of our value type. More...
 
this_typeoperator= (const this_type &list)
 Copy assign from a list of the same type. More...
 
this_typeoperator= (this_type &&list)
 Move assign from a list of the same type. More...
 
ThingieListoperator= (const RetainedList< FromPointerType > &list)
 Copy assign from another RetainedList whose value type is a subclass of our value type. More...
 
ThingieListoperator= (const RetainedList< FromPointerType > &&list)
 Move assign from another RetainedList whose value type is a subclass of our value type. More...
 
iterator begin () noexcept
 Iterators: Return our iterators with correct dereference operator instead of the ThingieList ones. More...
 
const_iterator begin () const noexcept
 
const_iterator cbegin () const noexcept
 
iterator end () noexcept
 
const_iterator end () const noexcept
 
const_iterator cend () const noexcept
 
reverse_iterator rbegin () noexcept
 
const_reverse_iterator rbegin () const noexcept
 
const_reverse_iterator crbegin () const noexcept
 
reverse_iterator rend () noexcept
 
const_reverse_iterator rend () const noexcept
 
const_reverse_iterator crend () const noexcept
 
PianodSongoperator[] (size_type item)
 Member accessors: return data as known type, instead of ThingieList. More...
 
PianodSong * const & operator[] (size_type item) const
 
PianodSong * & front ()
 
const PianodSong * & front () const
 
PianodSong * & back ()
 
const PianodSong * & back () const
 
iterator erase (const_iterator target)
 
iterator erase (const_iterator first, const_iterator last)
 
void push_back (PianodSong * add)
 
void push_back (const Retainer< InsertionType > &add)
 
void push_front (PianodSong * add)
 
void push_front (const Retainer< InsertionType > &add)
 
iterator insert (const_iterator where, const PianodSong * add)
 
iterator insert (const_iterator where, InputIterator first, InputIterator last)
 
void join (const this_type &from)
 
void join (this_type &&from)
 
- Public Member Functions inherited from ThingieList
 ~ThingieList ()
 Release items when being destroyed. More...
 
 ThingieList ()=default
 
 ThingieList (const ThingieList &list)
 Copy-construct items into this list. More...
 
 ThingieList (ThingieList &&list)
 Move-construct items into this list. More...
 
ThingieListoperator= (const ThingieList &list)
 Copy assign into the list. More...
 
ThingieListoperator= (ThingieList &&list)
 Move assign into the list. More...
 
template<class... Args>
iterator emplace (const_iterator pos, Args &&...args)=delete
 
template<class... Args>
void emplace_back (Args &&...args)=delete
 
iterator insert (const_iterator pos, std::initializer_list< MusicThingie * >)=delete
 
void clear (void)
 Replace all the usual methods with ones that manage object retention. More...
 
iterator erase (const_iterator target)
 
iterator erase (const_iterator first, const_iterator last)
 
iterator insert (const_iterator where, MusicThingie *const &add)
 
iterator insert (const_iterator where, MusicThingie *&&add)
 
template<class InputIterator >
iterator insert (const_iterator where, InputIterator first, InputIterator last)
 
void push_back (MusicThingie *add)
 
template<typename InsertionType >
void push_back (const Retainer< InsertionType > &add)
 
void push_front (MusicThingie *add)
 
template<typename InsertionType >
void push_front (const Retainer< InsertionType > &add)
 
void pop_back (void)
 
void pop_front (void)
 
void resize (size_type)=delete
 
void join (const ThingieList &from)
 Append another thingielist to this one. More...
 
void join (ThingieList &&from)
 Append another thingielist to this one. More...
 
void limitTo (MusicThingie::Type type)
 Purge anything that isn't a certain type. More...
 
bool purge (const Media::Source *const source)
 Purge any items from a particular source from the list. More...
 

Additional Inherited Members

- Public Types inherited from RetainedList< PianodSong * >
using music_type = typename std::remove_pointer< PianodSong * >::type
 

Detailed Description

A container for holding songs.

Used for queues, history, some search results and other cases where only songs apply.

Member Function Documentation

◆ mixedMerge()

void SongList::mixedMerge ( const SongList adds)

Randomly merge a songlist into another.

Randomly mix playlists together, but maintain sequence of each to accommodate sources like Pandora that (ostensibly) care about sequence.

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

◆ RetainedList() [1/5]

RetainedList< ActualType, ValueType >::RetainedList
inlinedefault

Default constructor.

◆ RetainedList() [2/5]

template<typename FromPointerType , class FromValueType = typename std::remove_pointer<FromPointerType>::type, typename = typename std::enable_if<std::is_base_of<ValueType, FromValueType>::value>::type>
RetainedList< ActualType, ValueType >::RetainedList ( typename FromPointerType  ,
class FromValueType  = typename std::remove_pointer<FromPointerType>::type,
typename  = typename std::enable_if<std::is_base_of<ValueType, FromValueType>::value>::type 
)
inline

Copy construct from another RetainedList whose value type is a subclass of our value type.

◆ RetainedList() [3/5]

RetainedList< ActualType, ValueType >::RetainedList
inline

Copy construct from list of same type.

◆ RetainedList() [4/5]

template<typename FromPointerType , class FromValueType = typename std::remove_pointer<FromPointerType>::type, typename = typename std::enable_if<std::is_base_of<ValueType, FromValueType>::value>::type>
RetainedList< ActualType, ValueType >::RetainedList ( typename FromPointerType  ,
class FromValueType  = typename std::remove_pointer<FromPointerType>::type,
typename  = typename std::enable_if<std::is_base_of<ValueType, FromValueType>::value>::type 
)
inline

Move construct from another RetainedList whose value type is a subclass of our value type.

◆ RetainedList() [5/5]

RetainedList< ActualType, ValueType >::RetainedList
inline

Move construct from a list of the same type.


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