Describes a CD track, it is just an object-oriented view of an actual track. More...
#include <OSDLCDROMDrive.h>
Public Member Functions | |
CDTrack (const LowLevelCDROMTrack &track) | |
Creates a new CD track. | |
virtual | ~CDTrack () throw () |
Virtual destructor, does not deallocate the track data. | |
virtual TrackNumber | getTrackNumber () const |
Return this track number (0-99). | |
virtual TrackType | getTrackType () const |
Returns this track type. | |
virtual FrameCount | getLength () const |
Returns the length, in frames, of this track. | |
virtual FrameCount | getFrameOffset () const |
Returns the frame offset to the beginning of this track. | |
virtual const std::string | toString (Ceylan::VerbosityLevels level=Ceylan::high) const |
Returns an user-friendly description of the state of this drive. | |
Protected Attributes | |
const LowLevelCDROMTrack * | _trackData |
Private Member Functions | |
CDTrack (const CDTrack &source) | |
Copy constructor made private to ensure that it will be never called. | |
CDTrack & | operator= (const CDTrack &source) |
Assignment operator made private to ensure that it will be never called. |
Describes a CD track, it is just an object-oriented view of an actual track.
Definition at line 100 of file OSDLCDROMDrive.h.
CDTrack::CDTrack | ( | const LowLevelCDROMTrack & | track | ) |
Creates a new CD track.
Implementation notes:
Does not take ownership of the specified track.
CDROMDriveException | if the operation failed or is not supported. |
Dummy values will be returned by non-static methods in case there is no SDL support available.
It is not a problem as these methods cannot be called: constructors always throw exceptions in that case, thus no instance can be available for these method calls.
PhysicsFS could be used as well for the management of CDROM drives Example: see PHYSFS_getCdRomDirs in physfs.h.
Definition at line 91 of file OSDLCDROMDrive.cc.
CDTrack::~CDTrack | ( | ) | throw () [virtual] |
Virtual destructor, does not deallocate the track data.
Definition at line 106 of file OSDLCDROMDrive.cc.
OSDL::CDTrack::CDTrack | ( | const CDTrack & | source | ) | [explicit, private] |
Copy constructor made private to ensure that it will be never called.
The compiler should complain whenever this undefined constructor is called, implicitly or not.
FrameCount CDTrack::getFrameOffset | ( | ) | const [virtual] |
Returns the frame offset to the beginning of this track.
Definition at line 183 of file OSDLCDROMDrive.cc.
References _trackData.
Referenced by toString().
FrameCount CDTrack::getLength | ( | ) | const [virtual] |
Returns the length, in frames, of this track.
Definition at line 166 of file OSDLCDROMDrive.cc.
References _trackData.
Referenced by toString().
TrackNumber CDTrack::getTrackNumber | ( | ) | const [virtual] |
Return this track number (0-99).
Definition at line 115 of file OSDLCDROMDrive.cc.
References _trackData.
Referenced by toString().
TrackType CDTrack::getTrackType | ( | ) | const [virtual] |
Returns this track type.
CDROMDriveException | if the operation failed. |
Definition at line 132 of file OSDLCDROMDrive.cc.
References _trackData, OSDL::audioTrack, and OSDL::dataTrack.
Referenced by toString().
Assignment operator made private to ensure that it will be never called.
The compiler should complain whenever this undefined operator is called, implicitly or not.
const string CDTrack::toString | ( | Ceylan::VerbosityLevels | level = Ceylan::high |
) | const [virtual] |
Returns an user-friendly description of the state of this drive.
level | the requested verbosity level. |
Definition at line 200 of file OSDLCDROMDrive.cc.
References OSDL::audioTrack, OSDL::CDROMDrive::ConvertFrameCountToTime(), OSDL::dataTrack, getFrameOffset(), getLength(), getTrackNumber(), and getTrackType().
Referenced by OSDL::CDROMDrive::toString().
const LowLevelCDROMTrack* OSDL::CDTrack::_trackData [protected] |
Definition at line 170 of file OSDLCDROMDrive.h.
Referenced by getFrameOffset(), getLength(), getTrackNumber(), and getTrackType().