00001 #ifndef _Q_FILELIST_HH_ 00002 #define _Q_FILELIST_HH_ 00003 00009 #include <string> 00010 #include <list> 00011 00012 class QFileList { 00013 00014 public: 00015 QFileList(); 00016 00017 ~QFileList(); 00018 00019 00020 void Add(const std::string& file) { fFileList.push_back(file); } 00021 void Add(const std::list<std::string>& list) ; 00022 void SetFilesPath(const std::string& path) { fFilesPath = path; } 00023 std::string GetFilesPath() { return fFilesPath; } 00024 00025 std::list<std::string> GetList(const std::string& option = ""); 00026 00027 void Write(const std::string& fileListPath) const; 00028 static void Write(const std::string& fileListFile, const std::list<std::string>& fileList, const std::string& filesPath); 00029 00030 void Read(const std::string& fileListPath); 00031 static std::list<std::string> Read(const std::string& fileListFile, const std::string& option); 00032 private: 00033 00034 std::list<std::string> fFileList; 00035 std::string fFilesPath; 00036 00037 00038 }; 00039 00040 #endif