Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

zeitgeist::FileSystem Class Reference

this class defines the interface which derived filesystems must implement in order to be used with the fileserver. More...

#include <filesystem.h>

Inheritance diagram for zeitgeist::FileSystem:

Inheritance graph
[legend]
Collaboration diagram for zeitgeist::FileSystem:

Collaboration graph
[legend]
List of all members.

Public Types

typedef void(* TCallback )(char *filename, void *param)
 this function defines an interface for a callback, used to iterate over files.

Public Member Functions

 FileSystem ()
 constructs a filesystem
virtual ~FileSystem ()
virtual boost::shared_ptr<
salt::RFile
Open (const std::string &inName)=0
 tries to open the file named inName.
virtual bool SetPath (const std::string &inPath)=0
 sets the path all calls to Open are relative to.
virtual int ForEachFile (const std::string &, TCallback callback, void *param)=0
 iterates over all files managed by this filesystem.

Private Member Functions

 FileSystem (const FileSystem &obj)
FileSystemoperator= (const FileSystem &obj)

Detailed Description

this class defines the interface which derived filesystems must implement in order to be used with the fileserver.

Definition at line 42 of file filesystem.h.


Member Typedef Documentation

typedef void(* zeitgeist::FileSystem::TCallback)(char *filename, void *param)
 

this function defines an interface for a callback, used to iterate over files.

It used in conjunction with ForEachFile().

Definition at line 51 of file filesystem.h.


Constructor & Destructor Documentation

zeitgeist::FileSystem::FileSystem  )  [inline]
 

constructs a filesystem

Definition at line 58 of file filesystem.h.

virtual zeitgeist::FileSystem::~FileSystem  )  [inline, virtual]
 

Definition at line 59 of file filesystem.h.

zeitgeist::FileSystem::FileSystem const FileSystem obj  )  [private]
 


Member Function Documentation

virtual int zeitgeist::FileSystem::ForEachFile const std::string &  ,
TCallback  callback,
void *  param
[pure virtual]
 

iterates over all files managed by this filesystem.

'directory', 'name' and 'extension' give directory, name and extension a file must match. directory,name and extension may be NULL, in wich case every directory,extension and/or name matches. For each match the function callback is called with the name of the matched file and the additional user parameter 'param'. param is just passed through to the callback and has no meaning to the filesystem.

virtual boost::shared_ptr<salt::RFile> zeitgeist::FileSystem::Open const std::string &  inName  )  [pure virtual]
 

tries to open the file named inName.

Returns an instance of a salt::RFile on success, NULL otherwise

Implemented in FileSystemSTD, and FileSystemZIP.

FileSystem& zeitgeist::FileSystem::operator= const FileSystem obj  )  [private]
 

virtual bool zeitgeist::FileSystem::SetPath const std::string &  inPath  )  [pure virtual]
 

sets the path all calls to Open are relative to.

For a standard file system this call maps directly to a directory. For Filesystems providing access to an archive it is used to select the archive, i.e. it is the filename of an archive. Please refer to concrete Filesystems for an example implementation.

Implemented in FileSystemSTD, and FileSystemZIP.


The documentation for this class was generated from the following file:
Generated on Thu Apr 6 15:50:10 2006 for rcssserver3d by  doxygen 1.4.4