Created
June 24, 2009 22:16
-
-
Save wackoisgod/135554 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Music { | |
struct TrackInfo { | |
const string m_length; | |
const u32 m_playerCount; | |
}; | |
struct EncodingInfo { | |
const u32 m_bitrate; // this could be stored in a smaller value ? | |
const u8 m_channels; // no more than 255 channels | |
}; | |
class Album { | |
public: | |
Album(const string name); | |
~Album(); | |
Song* AddSong(const string name); | |
void RemoveSong(Song* song); | |
bool FindSong(FindInfo& inInfo, Song* outSong); | |
private: | |
vector<Song*> m_songs; | |
const string m_name; | |
}; | |
class Song { | |
public: | |
Song(Album* album) | |
: m_album(album) { | |
} | |
~Song(); | |
void GetTrackInfo(const TrackInfo& inTrack); | |
void SetTrackInfo(const TrackInfo& inTrack); | |
void GetEncodingInfo(const EncodingInfo& inEncoding); | |
void SetEncodingInfo(const EncodingInfo& inEncoding); | |
const string GetTitle() { return m_title; } | |
const string GetArtist() { return m_artist; } | |
Album* GetAlbum() { return m_album; } | |
const string GetYear() { return m_year; } | |
const string GetGenre() { return m_genre; } | |
private: | |
TrackInfo m_info; | |
EncodingInfo m_encoding; | |
const string m_title; | |
const string m_artist; | |
Album* m_album; | |
const string m_year; | |
const string m_genre; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment