|
FIFE 2008.0
|
#include <vfssourceprovider.h>


Public Member Functions | |
| const std::string & | getName () const |
| void | setVFS (VFS *vfs) |
| virtual bool | isReadable (const std::string &file) const =0 |
| virtual VFSSource * | createSource (const std::string &file) const =0 |
VFSSourceProvider abstract baseclass
If you add support for a new archive-type (like the fallout1&dat files) you should also create a new VFSSourceProvider for your VFSSource - once this is done its very easy to load new archives even without knowing their real type.
Definition at line 49 of file vfssourceprovider.h.
| virtual VFSSource* FIFE::VFSSourceProvider::createSource | ( | const std::string & | file | ) | const [pure virtual] |
Create a new instance of a VFSSource initialized with the given file
| file | the filename to open (the archive-file) |
Implemented in FIFE::DirectoryProvider, and FIFE::ZipProvider.
Referenced by FIFE::VFS::createSource().

| const std::string & FIFE::VFSSourceProvider::getName | ( | ) | const |
Returns the name of this VFSSourceProvider
Definition at line 52 of file vfssourceprovider.cpp.
Referenced by FIFE::VFS::addProvider(), and FIFE::VFS::createSource().

| virtual bool FIFE::VFSSourceProvider::isReadable | ( | const std::string & | file | ) | const [pure virtual] |
Check if a given file is readable for this VFSSource
| file | the filename to check |
Implemented in FIFE::DirectoryProvider, and FIFE::ZipProvider.
Referenced by FIFE::VFS::createSource().

| void FIFE::VFSSourceProvider::setVFS | ( | VFS * | vfs | ) |
Get the VFS this provider is using. Providers will not be able to locate sources before a VFS is set. VFS::addProvider sets this automatically.
Definition at line 44 of file vfssourceprovider.cpp.
Referenced by FIFE::VFS::addProvider().
