00001 #ifndef _FILE_MANGER_H_ 00002 #define _FILE_MANGER_H_ 00003 00004 #include <vector> 00005 00006 #include "BaseImporter.h" 00007 #include "BaseReader.h" 00008 00009 namespace IOmgr { 00010 00011 00012 class FileManager { 00013 protected: 00014 static FileManager* instance; 00015 public: 00016 static void Init(const int argc, const char** argv); 00017 static FileManager* GetInstance(); 00018 static void Destroy(); 00019 bool ReadFile(const char* fname, BaseImporter& bimpr); 00020 void RegisterModules(BaseFileReader* bfr); 00021 bool IsFileExists(const char* fname) const; 00022 bool CheckInitials(const char* fname,const char* initials) 00023 { 00024 return BaseFileReader::CheckInitials(fname, initials); 00025 } 00026 00027 private: 00028 static int rargc; 00029 static char** rargv; 00030 std::vector<BaseFileReader*> readers; 00031 private: 00032 //std::set<float> reader; 00033 FileManager(); 00034 FileManager(const FileManager&); 00035 FileManager& operator=(FileManager&); 00036 00037 }; 00038 00039 } 00040 00041 00042 #endif /* _FILE_MANGER_H_ 00043 */