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

format.h

Go to the documentation of this file.
00001 #pragma once
00002 
00027 #ifndef __FORMAT_H__
00028 #define __FORMAT_H__
00029 
00030 // INCLUDES
00031 #include "fileinfo.h"
00032 
00033 // USINGS
00034 using std::string;
00035 using std::exception;
00036 
00038 class format
00039 {
00040         // Member functions.
00041 public:
00042         format(const string& FileName);
00043     void CheckFormat(void) const;
00044     void ParseFormat(const fileinfo* pFileInfo) const;
00045     void Show(void) const;
00046 private:
00047         bool FindFormatID(const string& idName) const;
00048         string::size_type GetNextFormatID(string& idName, string::size_type Offset) const;
00049 
00050         // Attributes.
00051 private:
00052         string m_Format;        
00053 };
00054 
00055 // Format exceptions.
00056 namespace except
00057 {
00059     class format_except: public exception
00060     {
00061         // Member functions.
00062     public:
00064         format_except(void) throw(): exception() {};
00066         virtual ~format_except(void) throw() {};
00068             virtual const char *what(void) const throw()=0;
00069     };
00070 
00072     class unfinished_id: public format_except
00073     {
00074     // Member functions.
00075     public:
00076         unfinished_id(string UnfinishedID) throw();
00077         virtual ~unfinished_id(void) throw();
00078         virtual const char *what(void) const throw();
00079 
00080         // Attributes.
00081     private:
00082         string m_UnfinishedID;   
00083     };
00084 };
00085 
00086 #endif // __FORMAT_H__

doxygen sourceforge id3lib