diff options
author | David Corrales | 2007-08-01 22:07:50 +0000 |
---|---|---|
committer | David Corrales | 2007-08-01 22:07:50 +0000 |
commit | 1400d28bfb37fc94f3c44dec0a4d0cef65fb8fb7 (patch) | |
tree | 57e08541d48d6a98fc7f700f75dade472a2878bb /common | |
parent | 9752c75f407c8bd82006222433fcc3618b9e82bb (diff) | |
download | scummvm-rg350-1400d28bfb37fc94f3c44dec0a4d0cef65fb8fb7.tar.gz scummvm-rg350-1400d28bfb37fc94f3c44dec0a4d0cef65fb8fb7.tar.bz2 scummvm-rg350-1400d28bfb37fc94f3c44dec0a4d0cef65fb8fb7.zip |
Initial commit of the new BaseFile implementation. It provides a common ground for file objects across platforms and divides responsibilities between the Common::File class and a base file implementation.
Also rearranged the factories into a new directory for clarity.
Note 1: The posix-file.h and cpp files are for testing only. Only the ds, ps2 and symbian architecture will use special BaseFile based objects.
Note 2: The current code does not yet make use of this new structure, since the Common::File remains intact.
svn-id: r28395
Diffstat (limited to 'common')
-rw-r--r-- | common/file.h | 7 | ||||
-rw-r--r-- | common/fs.cpp | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/common/file.h b/common/file.h index 4d519be475..d2eae1f28c 100644 --- a/common/file.h +++ b/common/file.h @@ -30,6 +30,8 @@ #include "common/scummsys.h" #include "common/str.h" #include "common/stream.h" +#include "backends/file/base-file.h" +//#include "backends/factories/fs-factory-maker.cpp" class FilesystemNode; @@ -38,6 +40,9 @@ namespace Common { class File : public SeekableReadStream, public WriteStream { protected: /** File handle to the actual file; 0 if no file is open. */ + //BaseFile *_test; + + /** File handle to the actual file; 0 if no file is open. */ void *_handle; /** Status flag which tells about recent I/O failures. */ @@ -52,7 +57,7 @@ private: // code that accidentally copied File objects tended to break in strange // ways. File(const File &f); - File &operator =(const File &f); + File &operator =(const File &f); public: enum AccessMode { diff --git a/common/fs.cpp b/common/fs.cpp index 28f3e11f0b..40d9e4de14 100644 --- a/common/fs.cpp +++ b/common/fs.cpp @@ -25,7 +25,7 @@ #include "common/stdafx.h" #include "common/util.h" #include "backends/fs/abstract-fs.h" -#include "backends/fs/fs-factory-maker.cpp" +#include "backends/factories/fs-factory-maker.cpp" /* * Simple DOS-style pattern matching function (understands * and ? like used in DOS). |