Wavelet and Image class library  1.3.2
FileName.hh
Go to the documentation of this file.
00001 /*
00002  * class FileName
00003  *
00004  * $Date$
00005  * $Revision$
00006  *
00007  */
00008 
00009 #ifndef FILE_NAME_HH__
00010 #define FILE_NAME_HH__
00011 
00019 typedef enum { 
00020   fn_pgm, fn_raw, fn_pfi, fn_ppm, fn_jpg, 
00021   fn_vid, fn_avi, fn_png, fn_gif, fn_unknown 
00022 } filetype;
00023 
00030 class 
00031 FileName
00032 {
00033 public:
00040   FileName (char const *name);
00042   ~FileName (void);
00043 
00049   bool isext (const char *ext) const;
00054   void toext (const char *ext);
00055 
00059   inline filetype guess (void) const { return m_ftype; }
00063   const char * guessedMimeType (void) const;
00067   inline char *file (void) const { return m_fname; }
00071   inline char *dir (void) const { return m_dirname; }
00075   inline char *base (void) const { return m_basename; }
00079   inline char *ext (void) const { return m_extension; }
00083   inline bool dos (void) const { return m_isdos; }
00084   
00085 private:
00087   char *m_fname;
00089   char *m_dirname;
00091   char *m_basename;
00093   char *m_extension;
00096   bool m_isdos;
00098   filetype m_ftype;
00100   void guessext (void);
00101 
00102 }; /* class FileName */
00103 
00106 #endif /* FILE_NAME_HH__ */
00107 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines