|
FIFE
|
VFSource for the Fallout1 DAT file format. More...
#include <dat1.h>
Inheritance diagram for FIFE::DAT1:
Collaboration diagram for FIFE::DAT1:Public Member Functions | |
| DAT1 (VFS *vfs, const std::string &file) | |
| Constructor Create a VFSSource for a Fallout1 DAT file. More... | |
| bool | fileExists (const std::string &name) const |
| check if the given file exists More... | |
| RawData * | open (const std::string &file) const |
| open a file inside this source More... | |
| const RawDataDAT1::s_info & | getInfo (const std::string &name) const |
| Get the needed information to unpack and extract a file from the DAT file. More... | |
| std::set< std::string > | listFiles (const std::string &pathstr) const |
| list all files in a directory of this source More... | |
| std::set< std::string > | listDirectories (const std::string &pathstr) const |
| list all directories in a directory of this source More... | |
Public Member Functions inherited from FIFE::VFSSource | |
| VFSSource (VFS *vfs) | |
| virtual | ~VFSSource () |
| VFS * | getVFS () const |
| get the VFS this source is associated with. More... | |
Private Types | |
| typedef std::map< std::string, RawDataDAT1::s_info > | type_filelist |
Private Member Functions | |
| std::set< std::string > | list (const std::string &pathstr, bool dirs) const |
| std::string | readString () |
| void | loadFileList (const std::string &dirname) |
| DAT1 (const DAT1 &) | |
| DAT1 & | operator= (const DAT1 &) |
Private Attributes | |
| std::string | m_datpath |
| boost::scoped_ptr< RawData > | m_data |
| type_filelist | m_filelist |
Additional Inherited Members | |
Protected Member Functions inherited from FIFE::VFSSource | |
| std::string | fixPath (std::string path) const |
|
private |
| FIFE::DAT1::DAT1 | ( | VFS * | vfs, |
| const std::string & | file | ||
| ) |
Constructor Create a VFSSource for a Fallout1 DAT file.
| vfs | A pointer to the VFS. |
| file | A Fallout1 DAT file - e.g. master.DAT |
Definition at line 39 of file dat1.cpp.
References FIFE::_log, FL_LOG, loadFileList(), m_data, and readString().
|
private |
|
virtual |
check if the given file exists
| file | filename to check |
Implements FIFE::VFSSource.
Definition at line 95 of file dat1.cpp.
References m_filelist.
| const RawDataDAT1::s_info & FIFE::DAT1::getInfo | ( | const std::string & | name | ) | const |
Get the needed information to unpack and extract a file from the DAT file.
Retrieves the Information needed to extract a specific file, this is passed as argument to a mffalloutrawdatadat1 RawMemSource, which itself fills its memory content with the unpacked file.
| NotFound |
Definition at line 99 of file dat1.cpp.
References m_filelist.
Referenced by open().
Here is the caller graph for this function:
|
private |
Definition at line 115 of file dat1.cpp.
References m_filelist.
Referenced by listDirectories(), and listFiles().
Here is the caller graph for this function:
|
virtual |
list all directories in a directory of this source
| path | path to list directories in Will return an empty list on any error |
Implements FIFE::VFSSource.
Definition at line 111 of file dat1.cpp.
References list().
|
virtual |
list all files in a directory of this source
| path | path to list files in Will return an empty list on any error |
Implements FIFE::VFSSource.
Definition at line 107 of file dat1.cpp.
References list().
|
private |
Definition at line 70 of file dat1.cpp.
References FIFE::VFSSource::fixPath(), m_data, m_filelist, FIFE::RawDataDAT1::s_info::name, FIFE::RawDataDAT1::s_info::offset, FIFE::RawDataDAT1::s_info::packedLength, readString(), FIFE::RawDataDAT1::s_info::type, and FIFE::RawDataDAT1::s_info::unpackedLength.
Referenced by DAT1().
Here is the caller graph for this function:
|
virtual |
open a file inside this source
| file | the file to open |
| CannotOpenFile | if the file can't be found |
Implements FIFE::VFSSource.
Definition at line 90 of file dat1.cpp.
References getInfo(), FIFE::VFSSource::getVFS(), and m_datpath.
|
private |
Definition at line 85 of file dat1.cpp.
References m_data.
Referenced by DAT1(), and loadFileList().
Here is the caller graph for this function:
|
private |
Definition at line 72 of file dat1.h.
Referenced by DAT1(), loadFileList(), and readString().
|
private |
|
private |
Definition at line 74 of file dat1.h.
Referenced by fileExists(), getInfo(), list(), and loadFileList().