#include <PlayList.h>
Inherits Observer.
Public Member Functions | |
PlayList () | |
~PlayList () | |
void | ClearList () |
void | Manage () |
Music * | GetCurrent () |
Music * | GetLast () |
void | Next (bool _Force=false) |
void | Previous () |
void | Stop () |
bool | AddMusic (const CString &_FileName) |
virtual void | Serialize (CArchive &_Archive) |
virtual void | Update () |
CList< Music *, Music * > & | GetMusicList () |
void | PlayAt (const POSITION &_Pos) |
void | RemoveAt (const POSITION &_Pos) |
void | SetCurrentPosition (const POSITION &_Pos) |
DECLARE_SERIAL (PlayList) | |
Public Attributes | |
CMutex | AccessMusicList |
PlayList::PlayList | ( | ) |
Default constructor
PlayList::~PlayList | ( | ) |
Destructor
bool PlayList::AddMusic | ( | const CString & | _FileName | ) |
Load a music and add to the end of the list
void PlayList::ClearList | ( | ) |
Destroy all the musics and clear the list
Music * PlayList::GetCurrent | ( | ) |
Get the current playing music
Music * PlayList::GetLast | ( | ) |
Get he last music of the list
Get the music list object
void PlayList::Manage | ( | ) |
Manage the current playing music, and call automaticaly the Next method
void PlayList::Next | ( | bool | _Force = false |
) |
Go to the next music of the list
_Force | If true (user clicked the Next button), goes to the first music if the current is the last |
void PlayList::PlayAt | ( | const POSITION & | _Pos | ) |
Play the music at the given position
_Pos | Position of the music |
void PlayList::Previous | ( | ) |
Go to the previous music
void PlayList::RemoveAt | ( | const POSITION & | _Pos | ) |
Remove a music at a given position @ param _Pos Position of the music
void PlayList::Serialize | ( | CArchive & | _Archive | ) | [virtual] |
Serialize the playlist in a CArchive. Used to save and load into and from files.
void PlayList::SetCurrentPosition | ( | const POSITION & | _Pos | ) |
Set the current playing music position
_Pos | Position of the music |
void PlayList::Stop | ( | ) |
Stop playing the current music
void PlayList::Update | ( | ) | [virtual] |
Update method, called by subjects when changes happen.
Reimplemented from Observer.