PlayList Class Reference

#include <PlayList.h>

Inherits Observer.

Collaboration diagram for PlayList:
[legend]

List of all members.

Public Member Functions

 PlayList ()
 ~PlayList ()
void ClearList ()
void Manage ()
MusicGetCurrent ()
MusicGetLast ()
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


Detailed Description

Class PlayList This class manages a play list.
Author:
Adrian Gaudebert - adrian.gaudebert@gmail.com

Simon Stephan - s.stephan88@gmail.com


Constructor & Destructor Documentation

PlayList::PlayList (  ) 

Default constructor

PlayList::~PlayList (  ) 

Destructor


Member Function Documentation

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

Returns:
Pointer to the music

Music * PlayList::GetLast (  ) 

Get he last music of the list

Returns:
Pointer to the music

CList< Music *, Music * > & PlayList::GetMusicList (  ) 

Get the music list object

Returns:
CList containing the current list of musics

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

Parameters:
_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

Parameters:
_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

Parameters:
_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.


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

Generated on Mon Jan 19 22:14:51 2009 for saMP by  doxygen 1.5.8