OSDLCDROMDriveHandler.h

Go to the documentation of this file.
00001 #ifndef OSDL_CD_ROM_DRIVE_HANDLER_H_
00002 #define OSDL_CD_ROM_DRIVE_HANDLER_H_
00003 
00004 
00005 #include "OSDLException.h"   // for OSDL::Exception
00006 
00007 #include "Ceylan.h"          // for inheritance
00008 
00009 
00010 #include <string>
00011 #include <map>
00012 
00013 
00014 namespace OSDL
00015 {
00016 
00017     
00018     
00020     class OSDL_DLL CDROMDriveException : public OSDL::Exception
00021     {
00022     
00023         public:
00024             
00025             CDROMDriveException( const std::string & message ) throw() ;
00026             virtual ~CDROMDriveException() throw() ;
00027     
00028     } ;
00029     
00030     
00031     
00037     typedef Ceylan::Count CDROMDriveNumber ;
00038     
00039     
00040     // CD-ROM handler manages CD-ROM drives.
00041     class CDROMDrive ;
00042     
00043     
00050     class OSDL_DLL CDROMDriveHandler : public Ceylan::Object
00051     {
00052     
00053         
00054         public:
00055         
00056         
00065             CDROMDriveHandler() throw( CDROMDriveException ) ;
00066             
00067             
00068             // Virtual destructor.
00069             virtual ~CDROMDriveHandler() throw() ;
00070             
00071             
00079             static CDROMDriveNumber GetAvailableCDROMDrivesCount() throw() ;
00080         
00081             
00099             CDROMDrive & getCDROMDrive( CDROMDriveNumber number = 0 ) 
00100                 throw( CDROMDriveException ) ;
00101         
00102         
00114             virtual const std::string toString( 
00115                 Ceylan::VerbosityLevels level = Ceylan::high ) const throw() ;
00116 
00117         
00118             
00119         private:
00120     
00121             
00122 /* 
00123  * Takes care of the awful issue of Windows DLL with templates.
00124  *
00125  * @see Ceylan's developer guide and README-build-for-windows.txt 
00126  * to understand it, and to be aware of the associated risks. 
00127  * 
00128  */
00129 #pragma warning( push )
00130 #pragma warning( disable : 4251 )
00131             
00137             std::map<CDROMDriveNumber, CDROMDrive *> _drives ;
00138             
00139 #pragma warning( pop ) 
00140             
00141 
00150             explicit CDROMDriveHandler( const CDROMDriveHandler & source )
00151                 throw() ;
00152             
00153             
00162             CDROMDriveHandler & operator = ( const CDROMDriveHandler & source )
00163                 throw() ;
00164             
00165     
00166     } ;
00167 
00168 
00169 }
00170 
00171 
00172 
00173 #endif // OSDL_CD_ROM_DRIVE_HANDLER_H_

Generated on Fri Mar 30 14:46:59 2007 for OSDL by  doxygen 1.5.1