FIFE
be64c707dea6b3250bd4355bf5c825d25920087d
|
VFSSource abstract baseclass. More...
#include <vfssource.h>
Public Member Functions | |
VFSSource (VFS *vfs) | |
virtual | ~VFSSource () |
virtual bool | fileExists (const std::string &file) const =0 |
check if the given file exists More... | |
VFS * | getVFS () const |
get the VFS this source is associated with. More... | |
virtual RawData * | open (const std::string &file) const =0 |
open a file inside this source More... | |
virtual std::set< std::string > | listFiles (const std::string &path) const =0 |
list all files in a directory of this source More... | |
virtual std::set< std::string > | listDirectories (const std::string &path) const =0 |
list all directories in a directory of this source More... | |
Protected Member Functions | |
std::string | fixPath (std::string path) const |
Private Attributes | |
VFS * | m_vfs |
VFSSource abstract baseclass.
VFSSources are used to provide transparent access to diffrent archives/filesystems etc. Examples are VFSHostSystem
Definition at line 46 of file vfssource.h.
FIFE::VFSSource::VFSSource | ( | VFS * | vfs | ) |
Definition at line 36 of file vfssource.cpp.
|
virtual |
Definition at line 39 of file vfssource.cpp.
References m_vfs, and FIFE::VFS::removeSource().
|
pure virtual |
check if the given file exists
file | filename to check |
Implemented in FIFE::DAT2, FIFE::VFSDirectory, FIFE::ZipSource, and FIFE::DAT1.
Referenced by FIFE::VFS::getSourceForFile().
|
protected |
Definition at line 45 of file vfssource.cpp.
Referenced by getVFS(), FIFE::DAT1::loadFileList(), and FIFE::DAT2::readFileEntry().
|
inline |
get the VFS this source is associated with.
Definition at line 60 of file vfssource.h.
References fixPath(), listDirectories(), listFiles(), m_vfs, and open().
Referenced by FIFE::DAT1::open(), and FIFE::DAT2::open().
|
pure virtual |
list all directories in a directory of this source
path | path to list directories in Will return an empty list on any error |
Implemented in FIFE::DAT2, FIFE::VFSDirectory, FIFE::DAT1, and FIFE::ZipSource.
Referenced by getVFS().
|
pure virtual |
list all files in a directory of this source
path | path to list files in Will return an empty list on any error |
Implemented in FIFE::DAT2, FIFE::VFSDirectory, FIFE::DAT1, and FIFE::ZipSource.
Referenced by getVFS().
|
pure virtual |
open a file inside this source
file | the file to open |
CannotOpenFile | if the file can't be found |
Implemented in FIFE::DAT2, FIFE::VFSDirectory, FIFE::ZipSource, and FIFE::DAT1.
Referenced by getVFS(), and FIFE::VFS::open().
|
private |
Definition at line 88 of file vfssource.h.
Referenced by getVFS(), and ~VFSSource().