aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2008-08-22 11:49:34 +0000
committerMax Horn2008-08-22 11:49:34 +0000
commit16e02f051d88c04c4a3eb7fbe319bb6b338d79ae (patch)
treea426233615e9b2a741d443f6ad466fa06a5087fe
parent79751b07aef33512e2ded0867bbca0c50723f314 (diff)
downloadscummvm-rg350-16e02f051d88c04c4a3eb7fbe319bb6b338d79ae.tar.gz
scummvm-rg350-16e02f051d88c04c4a3eb7fbe319bb6b338d79ae.tar.bz2
scummvm-rg350-16e02f051d88c04c4a3eb7fbe319bb6b338d79ae.zip
Turned SymbianFilesystemFactory from a singleton into a normal class; adapted symbian backend accordingly
svn-id: r34101
-rw-r--r--backends/fs/symbian/symbian-fs-factory.cpp4
-rw-r--r--backends/fs/symbian/symbian-fs-factory.h13
-rw-r--r--backends/platform/sdl/sdl.cpp1
-rw-r--r--backends/platform/symbian/src/SymbianOS.cpp6
-rw-r--r--backends/platform/symbian/src/SymbianOS.h1
5 files changed, 6 insertions, 19 deletions
diff --git a/backends/fs/symbian/symbian-fs-factory.cpp b/backends/fs/symbian/symbian-fs-factory.cpp
index 0a1bd62134..c31dfb594a 100644
--- a/backends/fs/symbian/symbian-fs-factory.cpp
+++ b/backends/fs/symbian/symbian-fs-factory.cpp
@@ -26,8 +26,6 @@
#include "backends/fs/symbian/symbian-fs-factory.h"
#include "backends/fs/symbian/symbian-fs.cpp"
-DECLARE_SINGLETON(SymbianFilesystemFactory);
-
AbstractFilesystemNode *SymbianFilesystemFactory::makeRootFileNode() const {
return new SymbianFilesystemNode(true);
}
@@ -38,7 +36,7 @@ AbstractFilesystemNode *SymbianFilesystemFactory::makeCurrentDirectoryFileNode()
return new SymbianFilesystemNode(path);
}
-AbstractFilesystemNode *SymbianFilesystemFactory::makeFileNodePath(const String &path) const {
+AbstractFilesystemNode *SymbianFilesystemFactory::makeFileNodePath(const Common::String &path) const {
return new SymbianFilesystemNode(path);
}
#endif
diff --git a/backends/fs/symbian/symbian-fs-factory.h b/backends/fs/symbian/symbian-fs-factory.h
index 502fba2930..ef5a231e72 100644
--- a/backends/fs/symbian/symbian-fs-factory.h
+++ b/backends/fs/symbian/symbian-fs-factory.h
@@ -25,7 +25,6 @@
#ifndef SYMBIAN_FILESYSTEM_FACTORY_H
#define SYMBIAN_FILESYSTEM_FACTORY_H
-#include "common/singleton.h"
#include "backends/fs/fs-factory.h"
/**
@@ -33,19 +32,11 @@
*
* Parts of this class are documented in the base interface class, FilesystemFactory.
*/
-class SymbianFilesystemFactory : public FilesystemFactory, public Common::Singleton<SymbianFilesystemFactory> {
+class SymbianFilesystemFactory : public FilesystemFactory {
public:
- typedef Common::String String;
-
virtual AbstractFilesystemNode *makeRootFileNode() const;
virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
- virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const;
-
-protected:
- SymbianFilesystemFactory() {};
-
-private:
- friend class Common::Singleton<SingletonBaseType>;
+ virtual AbstractFilesystemNode *makeFileNodePath(const Common::String &path) const;
};
#endif /*SYMBIAN_FILESYSTEM_FACTORY_H*/
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index 44ed5e45ff..fa0ea35cb5 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -268,6 +268,7 @@ Common::SaveFileManager *OSystem_SDL::getSavefileManager() {
}
FilesystemFactory *OSystem_SDL::getFilesystemFactory() {
+ assert(_fsFactory);
return _fsFactory;
}
diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp
index 33d18d9037..90bd99fa7d 100644
--- a/backends/platform/symbian/src/SymbianOS.cpp
+++ b/backends/platform/symbian/src/SymbianOS.cpp
@@ -123,10 +123,6 @@ void OSystem_SDL_Symbian::setFeatureState(Feature f, bool enable) {
}
}
-FilesystemFactory *OSystem_SDL_Symbian::getFilesystemFactory() {
- return &SymbianFilesystemFactory::instance();
-}
-
static Common::String getDefaultConfigFileName() {
char configFile[MAXPATHLEN];
strcpy(configFile, Symbian::GetExecutablePath());
@@ -164,6 +160,8 @@ void OSystem_SDL_Symbian::initBackend() {
actions->initInstanceMain(this);
actions->loadMapping();
initZones();
+
+ _fsFactory = new SymbianFilesystemFactory();
}
OSystem_SDL_Symbian::~OSystem_SDL_Symbian() {
diff --git a/backends/platform/symbian/src/SymbianOS.h b/backends/platform/symbian/src/SymbianOS.h
index cabfa51486..80329d984e 100644
--- a/backends/platform/symbian/src/SymbianOS.h
+++ b/backends/platform/symbian/src/SymbianOS.h
@@ -71,7 +71,6 @@ protected:
//
static void symbianMixCallback(void *s, byte *samples, int len);
- virtual FilesystemFactory *getFilesystemFactory();
public:
// vibration support
#ifdef USE_VIBRA_SE_PXXX