Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

CPlayList Class Reference

Linked List of Mp3 files for use as the MASTER Mp3 list as well for creatign user playlists. More...

#include <CDataStructures.h>

Inheritance diagram for CPlayList::

CList CListItem List of all members.

Public Methods

 CPlayList (void)
 ~CPlayList (void)
int getType (void)
CMp3TrackgetItem (void)
 Returns the internal pointer. More...

CMp3TrackgetItem (int number)
 Returns the item that is in position number, where the head is 1. More...

void moveItem (CMp3Track *mp3, int number)
 Moves an item in a a user list to the new position, head is pos. 1. More...

bool setPlayListName (string name)
 Set and get the play list name. More...

string getPlayListName (void)
bool isSortedByTitle (void)
 These 3 functions relevant only for MASTER_MP3. More...

void setSortedByTitle (void)
void setSortedByArtist (void)
void insertItem (CMp3Track *mp3)
 Insert CMp3Track into a MASTER_MP3 list. More...

void deleteItem (CMp3Track *mp3)
bool deleteItem (int number)
 Delete the item at position number, where 1 is the head the list. More...

void deleteMp3TrackFromList (string filename)
 Deletes all instances of Mp3Track matching given filename. More...

void setAsMaster (CList *userlists)
 Sets list as a MASTER_MP3 list. More...

void inputData (string inputdata)
string outputData (void)

Detailed Description

Linked List of Mp3 files for use as the MASTER Mp3 list as well for creatign user playlists.

Provides automatic reordering by title then artist or vice versa on function call as well as saving and loading via a string of all data. If specified as a master list with given pointer to a CUserPlayLists object upon deletion of an mp3 file, all references in any user play lists will be deleted as well. Provides standard saving/loading via one string


Constructor & Destructor Documentation

CPlayList::CPlayList void   
 

CPlayList::~CPlayList void   
 


Member Function Documentation

bool CPlayList::deleteItem int    number
 

Delete the item at position number, where 1 is the head the list.

Reimplemented from CList.

void CPlayList::deleteItem CMp3Track   mp3
 

void CPlayList::deleteMp3TrackFromList string    filename
 

Deletes all instances of Mp3Track matching given filename.

Meant to be only used internal. Use at your own risk.

CMp3Track * CPlayList::getItem int    number
 

Returns the item that is in position number, where the head is 1.

Returns NULL if the number is out of range for the list.

Reimplemented from CList.

CMp3Track * CPlayList::getItem void   
 

Returns the internal pointer.

Reimplemented from CList.

string CPlayList::getPlayListName void   
 

int CPlayList::getType void   
 

void CPlayList::inputData string    inputdata
 

void CPlayList::insertItem CMp3Track   mp3
 

Insert CMp3Track into a MASTER_MP3 list.

Inserts a CMp3Track in order only for the MASTER_MP3 list If done on a non MASTER_MP3 list, insert does not occur This function should always be used to insert files into the MASTER_MP3 list to keep them in lexicographical order. Though you perhaps won't need to use except for testing.

For USER lists, should use prepend(mp3), append(mp3), and insertItem(mp3, number)

bool CPlayList::isSortedByTitle void   
 

These 3 functions relevant only for MASTER_MP3.

void CPlayList::moveItem CMp3Track   mp3,
int    number
 

Moves an item in a a user list to the new position, head is pos. 1.

Will not work on a MASTER_MP3 list Make sure that mp3 points to an item in the playlist already else corruption will result. :)

string CPlayList::outputData void   
 

void CPlayList::setAsMaster CList   userlists
 

Sets list as a MASTER_MP3 list.

To be called only by CJukeBox for creating master lists Works only on empty lists. You shouldn't be using this function

bool CPlayList::setPlayListName string    name
 

Set and get the play list name.

Set the playlist name Default is blank A MASTER_MP3 list is "All MP3s" and unchangeable No user list can be named "All MP3s" setPlayListName() returns true on successful setting of a user list Returns false otherwise

void CPlayList::setSortedByArtist void   
 

void CPlayList::setSortedByTitle void   
 


The documentation for this class was generated from the following files:
Generated on Thu Dec 6 00:14:57 2001 for Dijinni by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001