|
OpenMW
|
#include <bsa_file.hpp>
Classes | |
| struct | FileStruct |
| Represents one file entry in the archive. More... | |
| struct | iltstr |
| Case insensitive string comparison. More... | |
Public Types | |
| typedef std::vector< FileStruct > | FileList |
Public Member Functions | |
| BSAFile () | |
| void | open (const std::string &file) |
| Open an archive file. More... | |
| bool | exists (const char *file) const |
| Check if a file exists. More... | |
| Files::IStreamPtr | getFile (const char *file) |
| Files::IStreamPtr | getFile (const FileStruct *file) |
| const FileList & | getList () const |
Private Types | |
| typedef std::map< const char *, int, iltstr > | Lookup |
Private Member Functions | |
| void | fail (const std::string &msg) |
| Error handling. More... | |
| void | readHeader () |
| Read header information from the input source. More... | |
| int | getIndex (const char *str) const |
| Get the index of a given file name, or -1 if not found. More... | |
Private Attributes | |
| FileList | files |
| Table of files in this archive. More... | |
| std::vector< char > | stringBuf |
| Filename string buffer. More... | |
| bool | isLoaded |
| True when an archive has been loaded. More... | |
| std::string | filename |
| Used for error messages. More... | |
| Lookup | lookup |
This class is used to read "Bethesda Archive Files", or BSAs.
| typedef std::vector<FileStruct> Bsa::BSAFile::FileList |
|
private |
A map used for fast file name lookup. The value is the index into the files[] vector above. The iltstr ensures that file name checks are case insensitive.
|
inline |
|
inline |
Check if a file exists.
|
private |
Error handling.
| Files::IStreamPtr BSAFile::getFile | ( | const char * | file | ) |
Open a file contained in the archive. Throws an exception if the file doesn't exist.
| Files::IStreamPtr BSAFile::getFile | ( | const FileStruct * | file | ) |
Open a file contained in the archive.
|
private |
Get the index of a given file name, or -1 if not found.
Get the index of a given file name, or -1 if not found
|
inline |
Get a list of all files
| void BSAFile::open | ( | const std::string & | file | ) |
Open an archive file.
|
private |
Read header information from the input source.
|
private |
Used for error messages.
|
private |
Table of files in this archive.
|
private |
True when an archive has been loaded.
|
private |
|
private |
Filename string buffer.
1.8.6