pianod2
multisource multiuser scriptable networked music player
Classes | Functions
retainedlist.h File Reference

Collections for music thingie types. More...

#include <vector>
#include <type_traits>
#include "musictypes.h"
#include "retainer.h"
Include dependency graph for retainedlist.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ThingieList
 Base class for storing lists of thingies, which need to be reference counted accurately. More...
 
class  RetainedList< ActualType, ValueType >
 Container class for storing reference-counted music thingies. More...
 
class  RetainedList< ActualType, ValueType >::iterator
 Iterators: bastardize ThingieList's iterator's dereference operators to return known type. More...
 
class  RetainedList< ActualType, ValueType >::const_iterator
 
class  RetainedList< ActualType, ValueType >::reverse_iterator
 
class  RetainedList< ActualType, ValueType >::const_reverse_iterator
 
class  PlaylistList
 A container for lists of playlists. More...
 
class  SongList
 A container for holding songs. More...
 

Functions

template<typename ToValueType , typename FromListType >
constexpr const RetainedList< ToValueType > & retained_list_cast (FromListType &from)
 static typecast for thingie lists: Typecasts a list of a given type to a list of a derived type. More...
 
template<typename ToValueType , typename FromListType >
constexpr const RetainedList< ToValueType > & retained_list_cast (const FromListType &from)
 static typecast for constant thingie lists: Typecasts a consetant list of a given type to a constant list of a derived type. More...
 

Detailed Description

Collections for music thingie types.

Function Documentation

◆ retained_list_cast() [1/2]

template<typename ToValueType , typename FromListType >
constexpr const RetainedList<ToValueType>& retained_list_cast ( const FromListType &  from)
constexpr

static typecast for constant thingie lists: Typecasts a consetant list of a given type to a constant list of a derived type.

Warning
Like all typecasts, this is a footgun.

◆ retained_list_cast() [2/2]

template<typename ToValueType , typename FromListType >
constexpr const RetainedList<ToValueType>& retained_list_cast ( FromListType &  from)
constexpr

static typecast for thingie lists: Typecasts a list of a given type to a list of a derived type.

Template Parameters
ToValueTypeThe
Warning
Like all typecasts, this is a footgun.