Cafu Engine
FileManImpl.hpp
1 /*
2 Cafu Engine, http://www.cafu.de/
3 Copyright (c) Carsten Fuchs and other contributors.
4 This project is licensed under the terms of the MIT license.
5 */
6 
7 #ifndef CAFU_FILESYS_FILEMAN_IMPL_HPP_INCLUDED
8 #define CAFU_FILESYS_FILEMAN_IMPL_HPP_INCLUDED
9 
10 #include "FileMan.hpp"
11 #include "Templates/Array.hpp"
12 
13 
14 namespace cf
15 {
16  namespace FileSys
17  {
18  /// This class implements the FileManI interface.
19  class FileManImplT : public FileManI
20  {
21  public:
22 
23  /// The constructor.
24  FileManImplT();
25 
26  /// The destructor.
27  ~FileManImplT();
28 
29 
30  // Implement all the (pure) virtual methods of the FileManI interface.
31  FileSystemT* MountFileSystem(FileSystemTypeT Type, const std::string& Descr, const std::string& MountPoint, const std::string& Password="");
32  void Unmount(FileSystemT* FileSystem);
33  InFileI* OpenRead(const std::string& FileName);
34  void Close(FileI* File);
35 
36 
37  private:
38 
39  FileManImplT(const FileManImplT&); ///< Use of the Copy Constructor is not allowed.
40  void operator = (const FileManImplT&); ///< Use of the Assignment Operator is not allowed.
41 
42  ArrayT<FileSystemT*> FileSystems; ///< The stack of file systems (local paths, archives, ...) where files are loaded from (and saved to).
43  };
44  }
45 }
46 
47 #endif
Definition: File.hpp:55
InFileI * OpenRead(const std::string &FileName)
Opens the file with the given name for reading.
Definition: FileManImpl.cpp:114
Definition: FileSys.hpp:42
This class implements the FileManI interface.
Definition: FileManImpl.hpp:19
void Unmount(FileSystemT *FileSystem)
"Unmounts" (or "unregisters") a file system from the file manager.
Definition: FileManImpl.cpp:84
Definition: File.hpp:23
FileManImplT()
The constructor.
Definition: FileManImpl.cpp:17
void Close(FileI *File)
Closes the given file.
Definition: FileManImpl.cpp:138
FileSystemT * MountFileSystem(FileSystemTypeT Type, const std::string &Descr, const std::string &MountPoint, const std::string &Password="")
"Mounts" (or "registers") a new file system into the scope of the file manager.
Definition: FileManImpl.cpp:29
Definition: Renderer.hpp:16
~FileManImplT()
The destructor.
Definition: FileManImpl.cpp:22
This class provides an interface to a file manager.
Definition: FileMan.hpp:30