FIFE  2008.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
FIFE::VFSSourceProvider Class Reference

#include <vfssourceprovider.h>

Inheritance diagram for FIFE::VFSSourceProvider:
Inheritance graph
Collaboration diagram for FIFE::VFSSourceProvider:
Collaboration graph

List of all members.

Public Member Functions

const std::string & getName () const
void setVFS (VFS *vfs)
virtual bool isReadable (const std::string &file) const =0
virtual VFSSourcecreateSource (const std::string &file) const =0

Detailed Description

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.

See also:
VFS
VFSSource
VFSSourceFactory

Definition at line 49 of file vfssourceprovider.h.


Member Function Documentation

virtual VFSSource* FIFE::VFSSourceProvider::createSource ( const std::string &  file) const
pure virtual

Create a new instance of a VFSSource initialized with the given file

Parameters:
filethe filename to open (the archive-file)
Returns:
the new VFSSource

Implemented in FIFE::DirectoryProvider, and FIFE::ZipProvider.

Referenced by FIFE::VFS::createSource().

Here is the caller graph for this function:

const std::string & FIFE::VFSSourceProvider::getName ( ) const

Returns the name of this VFSSourceProvider

Returns:
name

Definition at line 52 of file vfssourceprovider.cpp.

Referenced by FIFE::VFS::addProvider(), and FIFE::VFS::createSource().

Here is the caller graph for this function:

virtual bool FIFE::VFSSourceProvider::isReadable ( const std::string &  file) const
pure virtual

Check if a given file is readable for this VFSSource

Parameters:
filethe filename to check
Returns:
true if readable, false otherwise

Implemented in FIFE::DirectoryProvider, and FIFE::ZipProvider.

Referenced by FIFE::VFS::createSource().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:


The documentation for this class was generated from the following files: