FIFE 2008.0
FIFE::DAT1 Class Reference

#include <dat1.h>

Inheritance diagram for FIFE::DAT1:
Collaboration diagram for FIFE::DAT1:

List of all members.

Public Member Functions

 DAT1 (VFS *vfs, const std::string &file)
bool fileExists (const std::string &name) const
RawDataopen (const std::string &file) const
const RawDataDAT1::s_infogetInfo (const std::string &name) const
std::set< std::string > listFiles (const std::string &pathstr) const
std::set< std::string > listDirectories (const std::string &pathstr) const

Detailed Description

VFSource for the Fallout1 DAT file format.

Definition at line 44 of file dat1.h.


Constructor & Destructor Documentation

FIFE::DAT1::DAT1 ( VFS vfs,
const std::string &  file 
)

Constructor Create a VFSSource for a Fallout1 DAT file.

Parameters:
fileA Fallout1 DAT file - e.g. master.DAT

Definition at line 39 of file dat1.cpp.


Member Function Documentation

bool FIFE::DAT1::fileExists ( const std::string &  file) const [virtual]

check if the given file exists

Parameters:
filefilename to check
Returns:
true if it exists, false otherwise

Implements FIFE::VFSSource.

Definition at line 95 of file dat1.cpp.

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.

Exceptions:
NotFound
See also:
MFFalloutRawDataDAT1, RawMemSource

Definition at line 99 of file dat1.cpp.

Referenced by open().

Here is the caller graph for this function:

std::set< std::string > FIFE::DAT1::listDirectories ( const std::string &  path) const [virtual]

list all directories in a directory of this source

Parameters:
pathpath to list directories in Will return an empty list on any error

Implements FIFE::VFSSource.

Definition at line 111 of file dat1.cpp.

std::set< std::string > FIFE::DAT1::listFiles ( const std::string &  path) const [virtual]

list all files in a directory of this source

Parameters:
pathpath to list files in Will return an empty list on any error

Implements FIFE::VFSSource.

Definition at line 107 of file dat1.cpp.

RawData * FIFE::DAT1::open ( const std::string &  file) const [virtual]

open a file inside this source

Parameters:
filethe file to open
Returns:
a new RawData*
Exceptions:
CannotOpenFileif the file can't be found

Implements FIFE::VFSSource.

Definition at line 90 of file dat1.cpp.

References getInfo(), and FIFE::VFSSource::getVFS().


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Enumerations Enumerator