SdlMusicInfo Class Reference
[SDL based classes]

Base class for managing a list of music resources. More...

#include <sdlmusiclist.h>

List of all members.

Public Member Functions

DECLSPEC SdlMusicInfo (const char *fn, const char *title, const char *author, int secs=-1)
DECLSPEC void setFileName (const char *n)
const char * getFileName ()
 
Returns:
the filename of the song

DECLSPEC void setTitle (const char *t)
const char * getTitle ()
 
Returns:
the title of the song

DECLSPEC void setAuthor (const char *a)
const char * getAuthor ()
 
Returns:
the author

void setLength (int l)
int numPlayed ()
 
Returns:
the amount, how often the song has been played

void played ()
void reset ()


Detailed Description

Base class for managing a list of music resources.

This class manages the filename, author, title and duration information of a song.

See also:
SdlMusicList, SdlFileMusic


Constructor & Destructor Documentation

SdlMusicInfo::SdlMusicInfo ( const char *  fn,
const char *  title,
const char *  author,
int  secs = -1 
)

Constructor. Manages to store filename, title and author to the concerning variables.

Parameters:
fn the filename of the song
title the title, or however you want to use it
author the author, or however you want to use it
secs the length of the song in seconds


Member Function Documentation

void SdlMusicInfo::setFileName ( const char *  n  ) 

Changes the filename of the song.

Parameters:
n the new filename

void SdlMusicInfo::setTitle ( const char *  t  ) 

Changes the title-info of the song.

Parameters:
t the new title

void SdlMusicInfo::setAuthor ( const char *  a  ) 

Changes the author-info.

Parameters:
a the new author

void SdlMusicInfo::setLength ( int  l  )  [inline]

Changes the duration-info of the song.

Parameters:
l the new length in seconds

void SdlMusicInfo::played (  )  [inline]

Call it, when the song has been played. Increments the played-counter.

void SdlMusicInfo::reset (  )  [inline]

Resets the played-counter to zero.


The documentation for this class was generated from the following files:
Generated on Wed May 9 17:36:33 2007 for netrinjo by  doxygen 1.5.1