SDL++
C++wrapperfortheSDLlibrary.

sdl::devices::CdRom Struct Reference

Represents a cd drive. More...

#include <CdRom.h>

List of all members.

Public Member Functions

 CdRom (int drive)
 ~CdRom ()
string name ()
CDstatus status ()
bool cdInDrive ()
bool play (int start, int length)
bool playTracks (int startTrack, int startFrame, int numTracks, int numFrames)
bool pause ()
bool resume ()
bool stop ()
bool eject ()
SDL_CD * get () const
SDL_CD * get ()

Detailed Description

Represents a cd drive.

Definition at line 37 of file CdRom.h.


Constructor & Destructor Documentation

sdl::devices::CdRom::CdRom ( int  drive) [inline]

Opens the specified cd drive.

Parameters:
driveThe id of the cd drive.

Definition at line 43 of file CdRom.h.

sdl::devices::CdRom::~CdRom ( ) [inline]

Closes the cd drive.

Definition at line 48 of file CdRom.h.


Member Function Documentation

bool sdl::devices::CdRom::cdInDrive ( ) [inline]

Determines if a cd is in the drive.

Returns:
True if cd detected, false otherwise.

Definition at line 69 of file CdRom.h.

bool sdl::devices::CdRom::eject ( ) [inline]

Ejects the cd.

Returns:
Ture if successful, false otherwise.

Definition at line 119 of file CdRom.h.

SDL_CD* sdl::devices::CdRom::get ( ) [inline]

Gets the underlying SDL_CD structure.

Returns:
The SDL_CD structure.

Definition at line 133 of file CdRom.h.

SDL_CD* sdl::devices::CdRom::get ( ) const [inline]

Gets the underlying SDL_CD structure.

Returns:
The SDL_CD structure.

Definition at line 126 of file CdRom.h.

string sdl::devices::CdRom::name ( ) [inline]

Returns a system dependent human readable name of the cd drive.

Returns:
The system dependent human readable name of the cd drive.

Definition at line 55 of file CdRom.h.

bool sdl::devices::CdRom::pause ( ) [inline]

Pauses a cd playing.

Returns:
True if successful, false otherwise.

Definition at line 98 of file CdRom.h.

bool sdl::devices::CdRom::play ( int  start,
int  length 
) [inline]

Plays a cd starting a start frame for length number of frames.

Parameters:
startThe frame at which to start playing.
lengthThe number of frames to play.
Returns:
True if successful, false otherwise.

Definition at line 79 of file CdRom.h.

bool sdl::devices::CdRom::playTracks ( int  startTrack,
int  startFrame,
int  numTracks,
int  numFrames 
) [inline]

Plays tracks on the cd.

Parameters:
startTrackThe track to start playing.
startFrameThe frame offset from the start of startTrack to begin playing.
numTracksThe number of tracks to play.
numFramesThe number of frames from the beginning of the last track to play.
Returns:
True if successful, false otherwise.

Definition at line 91 of file CdRom.h.

bool sdl::devices::CdRom::resume ( ) [inline]

Resumes a cd playing.

Returns:
True if successful, false otherwise.

Definition at line 105 of file CdRom.h.

CDstatus sdl::devices::CdRom::status ( ) [inline]

Returns the status of the cd drive.

Returns:
The CDstatus.

Definition at line 62 of file CdRom.h.

bool sdl::devices::CdRom::stop ( ) [inline]

Stop a cd from playing.

Returns:
True if successful, false otherwise.

Definition at line 112 of file CdRom.h.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs