Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

filelist.h

Go to the documentation of this file.
00001 #pragma once
00002 
00027 #ifndef __FILELIST_H__
00028 #define __FILELIST_H__
00029 
00030 // INCLUDES
00031 #include "fileinfo.h"
00032 
00033 // USINGS
00034 using std::string;
00035 using std::list;
00036 
00038 class filelist
00039 {
00040         // Member functions.
00041 public:
00042         filelist(void);
00043         virtual ~filelist(void);
00044         void Show(void);
00045     void GenerateInfo(void);
00046     void Parse(void);
00047 protected:
00049         virtual void FindFiles(const string& FileRoute)=0;
00050     void AddFile(const string& FileName, long long FileSize);
00051     void ShowStats(void);
00052     void ShowProcess(const string& FileName);
00053 
00054         // Attributes.
00055 protected:
00056     int m_FilesFound;           
00057     int m_MP3Found;             
00058     int m_FailFiles;            
00059     int m_FilesProcessed;       
00060 private:
00061         list<fileinfo*> m_Files;    
00062 };
00063 
00064 // Filelist exceptions.
00065 namespace except
00066 {
00068     class filelist_except: public exception
00069     {
00070         // Member functions.
00071     public:
00073         filelist_except(void) throw(): exception() {};
00075         virtual ~filelist_except(void) throw() {};
00077             virtual const char *what(void) const throw()=0;
00078     };
00079 
00081     class invalid_route: public filelist_except
00082     {
00083         // Member functions.
00084     public:
00085         invalid_route(const string& InvalidRoute) throw();
00086         virtual ~invalid_route(void) throw();
00087         virtual const char *what(void) const throw();
00088 
00089         // Attributes.
00090     private:
00091         string m_InvalidRoute;      
00092     };
00093 
00095     class empty_directory: public filelist_except
00096     {
00097         // Member functions.
00098     public:
00099         empty_directory(const string& EmptyDirectory) throw();
00100         virtual ~empty_directory(void) throw();
00101         virtual const char *what(void) const throw();
00102 
00103         // Attributes.
00104     private:
00105         string m_EmptyDirectory;      
00106     };
00107 };
00108 
00109 #endif // __FILELIST_H__

doxygen sourceforge id3lib