#ifndef SONGUTIL_H #define SONGUTIL_H /* ----------------------------------------------------------------------------- Class: SongUtil Desc: Utility functions that deal with Song. Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. Chris Danford ----------------------------------------------------------------------------- */ #include "GameConstantsAndTypes.h" class Song; class Profile; struct XNode; namespace SongUtil { CString MakeSortString( CString s ); void SortSongPointerArrayByDifficulty( vector &arraySongPointers ); void SortSongPointerArrayByTitle( vector &arraySongPointers ); void SortSongPointerArrayByBPM( vector &arraySongPointers ); void SortSongPointerArrayByGrade( vector &arraySongPointers ); void SortSongPointerArrayByArtist( vector &arraySongPointers ); void SortSongPointerArrayByGroupAndDifficulty( vector &arraySongPointers ); void SortSongPointerArrayByGroupAndTitle( vector &arraySongPointers ); void SortSongPointerArrayByNumPlays( vector &arraySongPointers, ProfileSlot slot, bool bDescending ); void SortSongPointerArrayByNumPlays( vector &arraySongPointers, const Profile* pProfile, bool bDescending ); void SortSongPointerArrayByMeter( vector &arraySongPointers, Difficulty dc ); CString GetSectionNameFromSongAndSort( const Song* pSong, SortOrder so ); void SortSongPointerArrayBySectionName( vector &arraySongPointers, SortOrder so ); } class SongID { CString sDir; public: SongID() { Unset(); } void Unset() { FromSong(NULL); } void FromSong( const Song *p ); Song *ToSong() const; bool operator<( const SongID &other ) const { return sDir < other.sDir; } XNode* CreateNode() const; void LoadFromNode( const XNode* pNode ); bool IsValid() const; }; #endif