00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef FIFE_MAP_LOADERS_FALLOUT_DAT1_H
00023 #define FIFE_MAP_LOADERS_FALLOUT_DAT1_H
00024
00025
00026 #include <map>
00027 #include <boost/scoped_ptr.hpp>
00028
00029
00030
00031
00032
00033
00034
00035 #include "vfs/vfs.h"
00036 #include "vfs/vfssource.h"
00037
00038 #include "rawdatadat1.h"
00039
00040 namespace FIFE {
00041
00044 class DAT1 : public VFSSource {
00045 public:
00050 DAT1(VFS* vfs, const std::string& file);
00051
00052 bool fileExists(const std::string& name) const;
00053 RawData* open(const std::string& file) const;
00054
00064 const RawDataDAT1::s_info& getInfo(const std::string& name) const;
00065
00066 std::set<std::string> listFiles(const std::string& pathstr) const;
00067 std::set<std::string> listDirectories(const std::string& pathstr) const;
00068
00069 private:
00070 std::string m_datpath;
00071 boost::scoped_ptr<RawData> m_data;
00072 typedef std::map<std::string, RawDataDAT1::s_info> type_filelist;
00073 type_filelist m_filelist;
00074
00075 std::set<std::string> list(const std::string& pathstr, bool dirs) const;
00076 std::string readString();
00077
00078 void loadFileList(const std::string& dirname);
00079
00080
00081 DAT1(const DAT1&);
00082 DAT1& operator=(const DAT1&);
00083 };
00084
00085 }
00086
00087 #endif