Etterna 0.74.4
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
SongManager Class Reference

The holder for the Songs and its Steps. More...

#include <SongManager.h>

Collaboration diagram for SongManager:
Collaboration graph
[legend]

Classes

struct  Comp
 

Public Member Functions

void InitSongsFromDisk (LoadingWindow *ld)
 
void CalcTestStuff ()
 
void FreeSongs ()
 
void Cleanup ()
 
void UnlistSong (Song *song)
 
void Invalidate (const Song *pStaleSong)
 
void InitAll (LoadingWindow *ld)
 
auto DifferentialReload () -> int
 
auto DifferentialReloadDir (std::string dir) -> int
 
auto IsGroupNeverCached (const std::string &group) const -> bool
 
void SetFavoritedStatus (std::set< std::string > &favs)
 
void SetPermaMirroredStatus (std::set< std::string > &pmir)
 
void SetHasGoal (std::unordered_map< std::string, GoalsForChart > &goalmap)
 
auto GetSongGroupBannerPath (const std::string &sSongGroup) const -> std::string
 
auto GetSongGroupBannerPaths () const -> std::vector< std::string >
 
void GetSongGroupNames (std::vector< std::string > &AddTo) const
 
auto GetSongGroupNames () const -> const std::vector< std::string > &
 
auto DoesSongGroupExist (const std::string &sSongGroup) const -> bool
 
auto GetSongGroupColor (const std::string &sSongGroupName, std::map< std::string, Playlist > &playlists=GetPlaylists()) const -> RageColor
 
auto GetSongColor (const Song *pSong) const -> RageColor
 
auto GetStepsByChartkey (const std::string &ck) -> Steps *
 
auto GetSongByChartkey (const std::string &ck) -> Song *
 
void UnloadAllCalcDebugOutput ()
 
auto IsChartLoaded (const std::string &ck) const -> bool
 
void ResetGroupColors ()
 
auto GetSongs (const std::string &sGroupName) const -> const std::vector< Song * > &
 Retrieve all of the songs that belong to a particular group.
 
void ForceReloadSongGroup (const std::string &sGroupName) const
 
void GenerateCachefilesForGroup (const std::string &sGroupName) const
 
auto GetAllSongs () const -> const std::vector< Song * > &
 Retrieve all of the songs in the game.
 
auto GetPopularSongs () const -> const std::vector< Song * > &
 Retrieve all of the popular songs.
 
void GetFavoriteSongs (std::vector< Song * > &songs) const
 
auto GetNumSongs () const -> int
 Retrieve the number of songs in the game.
 
auto GetNumAdditionalSongs () const -> int
 
auto GetNumSongGroups () const -> int
 
auto GetSongGroupByIndex (const unsigned index) -> std::string
 
auto GetSongFromDir (std::string sDir) const -> Song *
 
void SortSongs ()
 
void PushSelf (lua_State *L)
 
void ReconcileChartKeysForReloadedSong (Song *reloadedSong, const std::vector< std::string > &oldChartkeys)
 
void MakeSongGroupsFromPlaylists (std::map< std::string, Playlist > &playlists=GetPlaylists())
 
void DeletePlaylist (const std::string &pl, std::map< std::string, Playlist > &playlists=GetPlaylists())
 
bool OpenSongFolder (const Song *pSong)
 
auto SaveCalcTestCreateNode () const -> XNode *
 
void SaveCalcTestXmlToDir () const
 
void AddKeyedPointers (Song *new_song)
 

Static Public Member Functions

static auto GetPlaylists () -> std::map< std::string, Playlist > &
 
static void SaveEnabledSongsToPref ()
 
static void LoadEnabledSongsFromPref ()
 
static auto ShortenGroupName (const std::string &sLongGroupName) -> std::string
 
static void DeleteSteps (Steps *pSteps)
 
static auto WasLoadedFromAdditionalSongs (const Song *pSong) -> bool
 
static void MakePlaylistFromFavorites (std::set< std::string > &favs, std::map< std::string, Playlist > &playlists=GetPlaylists())
 
static void FinalizeSong (Song *pNewSong, const std::string &dir)
 
static void LoadCalcTestNode ()
 
static bool InstallSmzip (const std::string &zipFile)
 

Public Attributes

std::string activeplaylist = ""
 
std::string playlistcourse = ""
 
std::map< std::string, std::vector< Song * > > groupderps
 
std::vector< std::string > playlistGroups
 
std::map< Skillset, CalcTestListtestChartList
 
std::unique_ptr< Calccalc
 
std::unordered_map< std::string, Song * > SongsByKey
 
std::unordered_map< std::string, Steps * > StepsByKey
 

Protected Types

using SongPointerVector = std::vector< Song * >
 

Protected Member Functions

void LoadStepManiaSongDir (std::string sDir, LoadingWindow *ld)
 
auto AddGroup (const std::string &sDir, const std::string &sGroupDirName) -> bool
 
void AddSongToList (Song *new_song)
 

Static Protected Member Functions

static auto IsSongDir (const std::string &sDir) -> bool
 

Protected Attributes

std::vector< Song * > m_pSongs
 All of the songs that can be played.
 
std::map< std::string, Song * > m_SongsByDir
 
std::vector< std::pair< std::pair< std::string, unsigned int >, Song * > * > cache
 
std::set< std::string > m_GroupsToNeverCache
 
std::vector< Song * > m_pDeletedSongs
 The most popular songs ranked by number of plays.
 
std::vector< Song * > m_pPopularSongs
 
std::vector< std::string > m_sSongGroupNames
 
std::vector< std::string > m_sSongGroupBannerPaths
 
std::map< std::string, SongPointerVector, Compm_mapSongGroupIndex
 
ThemeMetric< int > NUM_SONG_GROUP_COLORS
 
ThemeMetric1D< RageColorSONG_GROUP_COLOR
 

Detailed Description

The holder for the Songs and its Steps.

Member Function Documentation

◆ GetAllSongs()

auto SongManager::GetAllSongs ( ) const -> const std::vector<Song*>&
inline

Retrieve all of the songs in the game.

Returns
all of the songs.

◆ GetNumSongs()

auto SongManager::GetNumSongs ( ) const -> int

Retrieve the number of songs in the game.

Returns
the number of songs.

◆ GetPopularSongs()

auto SongManager::GetPopularSongs ( ) const -> const std::vector<Song*>&
inline

Retrieve all of the popular songs.

Popularity is determined specifically by the number of times a song is chosen.

Returns
all of the popular songs.

◆ GetSongs()

auto SongManager::GetSongs ( const std::string &  sGroupName) const -> const std::vector<Song*>&

Retrieve all of the songs that belong to a particular group.

Parameters
sGroupNamethe name of the group.
Returns
the songs that belong in the group.

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