From 86324f00bc561c03b281170125ef2fde14cae132 Mon Sep 17 00:00:00 2001 From: David Corrales Date: Sat, 12 May 2007 18:17:40 +0000 Subject: Renamed files and minor tweaks. Thanks LordHoto :) svn-id: r26810 --- backends/fs/AbstractFilesystemFactory.h | 48 --------- backends/fs/FilesystemFactoryMaker.cpp | 113 ---------------------- backends/fs/abstract-fs-factory.h | 48 +++++++++ backends/fs/abstract-fs.h | 1 - backends/fs/amigaos4/AmigaOSFilesystemFactory.cpp | 23 ----- backends/fs/amigaos4/AmigaOSFilesystemFactory.h | 38 -------- backends/fs/amigaos4/amigaos4-fs-factory.cpp | 23 +++++ backends/fs/amigaos4/amigaos4-fs-factory.h | 33 +++++++ backends/fs/dc/RoninCDFilesystemFactory.cpp | 23 ----- backends/fs/dc/RoninCDFilesystemFactory.h | 38 -------- backends/fs/dc/ronincd-fs-factory.cpp | 23 +++++ backends/fs/dc/ronincd-fs-factory.h | 33 +++++++ backends/fs/ds/DSFilesystemFactory.cpp | 36 ------- backends/fs/ds/DSFilesystemFactory.h | 38 -------- backends/fs/ds/ds-fs-factory.cpp | 36 +++++++ backends/fs/ds/ds-fs-factory.h | 33 +++++++ backends/fs/fs-factory-maker.cpp | 113 ++++++++++++++++++++++ backends/fs/gp32/GP32FilesystemFactory.cpp | 23 ----- backends/fs/gp32/GP32FilesystemFactory.h | 38 -------- backends/fs/gp32/gp32-fs-factory.cpp | 23 +++++ backends/fs/gp32/gp32-fs-factory.h | 33 +++++++ backends/fs/morphos/ABoxFilesystemFactory.cpp | 23 ----- backends/fs/morphos/ABoxFilesystemFactory.h | 38 -------- backends/fs/morphos/abox-fs-factory.cpp | 23 +++++ backends/fs/morphos/abox-fs-factory.h | 33 +++++++ backends/fs/palmos/PalmOSFilesystemFactory.cpp | 23 ----- backends/fs/palmos/PalmOSFilesystemFactory.h | 38 -------- backends/fs/palmos/palmos-fs-factory.cpp | 23 +++++ backends/fs/palmos/palmos-fs-factory.h | 33 +++++++ backends/fs/posix/POSIXFilesystemFactory.cpp | 25 ----- backends/fs/posix/POSIXFilesystemFactory.h | 38 -------- backends/fs/posix/posix-fs-factory.cpp | 25 +++++ backends/fs/posix/posix-fs-factory.h | 33 +++++++ backends/fs/ps2/Ps2FilesystemFactory.cpp | 23 ----- backends/fs/ps2/Ps2FilesystemFactory.h | 38 -------- backends/fs/ps2/ps2-fs-factory.cpp | 23 +++++ backends/fs/ps2/ps2-fs-factory.h | 33 +++++++ backends/fs/psp/PSPFilesystemFactory.cpp | 23 ----- backends/fs/psp/PSPFilesystemFactory.h | 38 -------- backends/fs/psp/psp-fs-factory.cpp | 23 +++++ backends/fs/psp/psp-fs-factory.h | 33 +++++++ backends/fs/symbian/SymbianFilesystemFactory.cpp | 25 ----- backends/fs/symbian/SymbianFilesystemFactory.h | 38 -------- backends/fs/symbian/symbian-fs-factory.cpp | 25 +++++ backends/fs/symbian/symbian-fs-factory.h | 33 +++++++ backends/fs/windows/WindowsFilesystemFactory.cpp | 23 ----- backends/fs/windows/WindowsFilesystemFactory.h | 38 -------- backends/fs/windows/windows-fs-factory.cpp | 23 +++++ backends/fs/windows/windows-fs-factory.h | 33 +++++++ 49 files changed, 794 insertions(+), 850 deletions(-) delete mode 100644 backends/fs/AbstractFilesystemFactory.h delete mode 100644 backends/fs/FilesystemFactoryMaker.cpp create mode 100644 backends/fs/abstract-fs-factory.h delete mode 100644 backends/fs/amigaos4/AmigaOSFilesystemFactory.cpp delete mode 100644 backends/fs/amigaos4/AmigaOSFilesystemFactory.h create mode 100644 backends/fs/amigaos4/amigaos4-fs-factory.cpp create mode 100644 backends/fs/amigaos4/amigaos4-fs-factory.h delete mode 100644 backends/fs/dc/RoninCDFilesystemFactory.cpp delete mode 100644 backends/fs/dc/RoninCDFilesystemFactory.h create mode 100644 backends/fs/dc/ronincd-fs-factory.cpp create mode 100644 backends/fs/dc/ronincd-fs-factory.h delete mode 100644 backends/fs/ds/DSFilesystemFactory.cpp delete mode 100644 backends/fs/ds/DSFilesystemFactory.h create mode 100644 backends/fs/ds/ds-fs-factory.cpp create mode 100644 backends/fs/ds/ds-fs-factory.h create mode 100644 backends/fs/fs-factory-maker.cpp delete mode 100644 backends/fs/gp32/GP32FilesystemFactory.cpp delete mode 100644 backends/fs/gp32/GP32FilesystemFactory.h create mode 100644 backends/fs/gp32/gp32-fs-factory.cpp create mode 100644 backends/fs/gp32/gp32-fs-factory.h delete mode 100644 backends/fs/morphos/ABoxFilesystemFactory.cpp delete mode 100644 backends/fs/morphos/ABoxFilesystemFactory.h create mode 100644 backends/fs/morphos/abox-fs-factory.cpp create mode 100644 backends/fs/morphos/abox-fs-factory.h delete mode 100644 backends/fs/palmos/PalmOSFilesystemFactory.cpp delete mode 100644 backends/fs/palmos/PalmOSFilesystemFactory.h create mode 100644 backends/fs/palmos/palmos-fs-factory.cpp create mode 100644 backends/fs/palmos/palmos-fs-factory.h delete mode 100644 backends/fs/posix/POSIXFilesystemFactory.cpp delete mode 100644 backends/fs/posix/POSIXFilesystemFactory.h create mode 100644 backends/fs/posix/posix-fs-factory.cpp create mode 100644 backends/fs/posix/posix-fs-factory.h delete mode 100644 backends/fs/ps2/Ps2FilesystemFactory.cpp delete mode 100644 backends/fs/ps2/Ps2FilesystemFactory.h create mode 100644 backends/fs/ps2/ps2-fs-factory.cpp create mode 100644 backends/fs/ps2/ps2-fs-factory.h delete mode 100644 backends/fs/psp/PSPFilesystemFactory.cpp delete mode 100644 backends/fs/psp/PSPFilesystemFactory.h create mode 100644 backends/fs/psp/psp-fs-factory.cpp create mode 100644 backends/fs/psp/psp-fs-factory.h delete mode 100644 backends/fs/symbian/SymbianFilesystemFactory.cpp delete mode 100644 backends/fs/symbian/SymbianFilesystemFactory.h create mode 100644 backends/fs/symbian/symbian-fs-factory.cpp create mode 100644 backends/fs/symbian/symbian-fs-factory.h delete mode 100644 backends/fs/windows/WindowsFilesystemFactory.cpp delete mode 100644 backends/fs/windows/WindowsFilesystemFactory.h create mode 100644 backends/fs/windows/windows-fs-factory.cpp create mode 100644 backends/fs/windows/windows-fs-factory.h (limited to 'backends') diff --git a/backends/fs/AbstractFilesystemFactory.h b/backends/fs/AbstractFilesystemFactory.h deleted file mode 100644 index 4af8c6b657..0000000000 --- a/backends/fs/AbstractFilesystemFactory.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef ABSTRACTFILESYSTEMFACTORY_H_ -#define ABSTRACTFILESYSTEMFACTORY_H_ - -#include "common/str.h" - -/** - * Creates concrete FilesystemNode objects depending on the current architecture. - */ -class AbstractFilesystemFactory { -public: - typedef Common::String String; - - /** - * Destructor. - */ - virtual ~AbstractFilesystemFactory() {}; - - /** - * Returns a node representing the "current directory". - * If your system does not support this concept, you can either try to - * emulate it or simply return some "sensible" default directory node, - * e.g. the same value as getRoot() returns. - */ - virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const = 0; - - /** - * Construct a node based on a path; the path is in the same format as it - * would be for calls to fopen(). - * - * Furthermore getNodeForPath(oldNode.path()) should create a new node - * identical to oldNode. Hence, we can use the "path" value for persistent - * storage e.g. in the config file. - * - * @param path The path string to create a FilesystemNode for. - */ - virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const = 0; - - /** - * Returns a special node representing the filesystem root. - * The starting point for any file system browsing. - * - * On Unix, this will be simply the node for / (the root directory). - * On Windows, it will be a special node which "contains" all drives (C:, D:, E:). - */ - virtual AbstractFilesystemNode *makeRootFileNode() const = 0; -}; - -#endif /*ABSTRACTFILESYSTEMFACTORY_H_*/ diff --git a/backends/fs/FilesystemFactoryMaker.cpp b/backends/fs/FilesystemFactoryMaker.cpp deleted file mode 100644 index 66a1c8c0c4..0000000000 --- a/backends/fs/FilesystemFactoryMaker.cpp +++ /dev/null @@ -1,113 +0,0 @@ -#include "backends/fs/AbstractFilesystemFactory.h" - -/* - * All the following includes choose, at compile time, which specific backend will be used - * during the execution of the ScummVM. - * - * It has to be done this way because not all the necessary libraries will be available in - * all build environments. Additionally, this results in smaller binaries. - */ -#if defined(__amigaos4__) - #include "backends/fs/amigaos4/AmigaOSFilesystemFactory.cpp" -#endif - -#if defined(__DC__) - #include "backends/fs/dc/RoninCDFilesystemFactory.cpp" -#endif - -#if defined(__DS__) - #include "backends/fs/ds/DSFilesystemFactory.cpp" -#endif - -#if defined(__GP32__) - #include "backends/fs/gp32/GP32FilesystemFactory.cpp" -#endif - -#if defined(__MORPHOS__) - #include "backends/fs/morphos/ABoxFilesystemFactory.cpp" -#endif - -#if defined(PALMOS_MODE) - #include "backends/fs/palmos/PalmOSFilesystemFactory.cpp" -#endif - -#if defined(__PLAYSTATION2__) - #include "backends/fs/ps2/Ps2FilesystemFactory.cpp" -#endif - -#if defined(__PSP__) - #include "backends/fs/psp/PSPFilesystemFactory.cpp" -#endif - -#if defined(__SYMBIAN32__) - #include "backends/fs/symbian/SymbianFilesystemFactory.cpp" -#endif - -#if defined(UNIX) - #include "backends/fs/posix/POSIXFilesystemFactory.cpp" -#endif - -#if defined(WIN32) - #include "backends/fs/windows/WindowsFilesystemFactory.cpp" -#endif - -/** - * Creates concrete FilesystemFactory objects depending on the current architecture. - */ -class FilesystemFactoryMaker { -public: - - /** - * Returns the correct concrete factory depending on the current build architecture. - */ - static AbstractFilesystemFactory *makeFactory(); - -protected: - FilesystemFactoryMaker() {}; // avoid instances of this class -}; - -AbstractFilesystemFactory *FilesystemFactoryMaker::makeFactory(){ - #if defined(__amigaos4__) - return AmigaOSFilesystemFactory::instance(); - #endif - - #if defined(__DC__) - return RoninCDFilesystemFactory::instance(); - #endif - - #if defined(__DS__) - return DSFilesystemFactory::instance(); - #endif - - #if defined(__GP32__) - return GP32FilesystemFactory::instance(); - #endif - - #if defined(__MORPHOS__) - return ABoxFilesystemFactory::instance(); - #endif - - #if defined(PALMOS_MODE) - return PalmOSFilesystemFactory::instance(); - #endif - - #if defined(__PLAYSTATION2__) - return Ps2FilesystemFactory::instance(); - #endif - - #if defined(__PSP__) - return PSPFilesystemFactory::instance(); - #endif - - #if defined(__SYMBIAN32__) - return SymbianFilesystemFactory::instance(); - #endif - - #if defined(UNIX) - return POSIXFilesystemFactory::instance(); - #endif - - #if defined(WIN32) - return WindowsFilesystemFactory::instance(); - #endif -} diff --git a/backends/fs/abstract-fs-factory.h b/backends/fs/abstract-fs-factory.h new file mode 100644 index 0000000000..41bfaaa34b --- /dev/null +++ b/backends/fs/abstract-fs-factory.h @@ -0,0 +1,48 @@ +#ifndef ABSTRACT_FILESYSTEM_FACTORY_H +#define ABSTRACT_FILESYSTEM_FACTORY_H + +#include "common/str.h" + +/** + * Creates concrete FilesystemNode objects depending on the current architecture. + */ +class AbstractFilesystemFactory { +public: + typedef Common::String String; + + /** + * Destructor. + */ + virtual ~AbstractFilesystemFactory() {}; + + /** + * Returns a node representing the "current directory". + * If your system does not support this concept, you can either try to + * emulate it or simply return some "sensible" default directory node, + * e.g. the same value as getRoot() returns. + */ + virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const = 0; + + /** + * Construct a node based on a path; the path is in the same format as it + * would be for calls to fopen(). + * + * Furthermore getNodeForPath(oldNode.path()) should create a new node + * identical to oldNode. Hence, we can use the "path" value for persistent + * storage e.g. in the config file. + * + * @param path The path string to create a FilesystemNode for. + */ + virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const = 0; + + /** + * Returns a special node representing the filesystem root. + * The starting point for any file system browsing. + * + * On Unix, this will be simply the node for / (the root directory). + * On Windows, it will be a special node which "contains" all drives (C:, D:, E:). + */ + virtual AbstractFilesystemNode *makeRootFileNode() const = 0; +}; + +#endif /*ABSTRACT_FILESYSTEM_FACTORY_H*/ diff --git a/backends/fs/abstract-fs.h b/backends/fs/abstract-fs.h index 86149dfffa..8297bf69e2 100644 --- a/backends/fs/abstract-fs.h +++ b/backends/fs/abstract-fs.h @@ -24,7 +24,6 @@ #include "common/array.h" #include "common/str.h" - #include "common/fs.h" class AbstractFilesystemNode; diff --git a/backends/fs/amigaos4/AmigaOSFilesystemFactory.cpp b/backends/fs/amigaos4/AmigaOSFilesystemFactory.cpp deleted file mode 100644 index 2f26491788..0000000000 --- a/backends/fs/amigaos4/AmigaOSFilesystemFactory.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include "backends/fs/amigaos4/AmigaOSFilesystemFactory.h" -#include "backends/fs/amigaos4/amigaos4-fs.cpp" - -AmigaOSFilesystemFactory *AmigaOSFilesystemFactory::_instance = 0; - -AmigaOSFilesystemFactory *AmigaOSFilesystemFactory::instance(){ - if(_instance == 0){ - _instance = new AmigaOSFilesystemFactory(); - } - return _instance; -} - -AbstractFilesystemNode *AmigaOSFilesystemFactory::makeRootFileNode() const { - return new AmigaOSFilesystemNode(); -} - -AbstractFilesystemNode *AmigaOSFilesystemFactory::makeCurrentDirectoryFileNode() const { - return new AmigaOSFilesystemNode(); -} - -AbstractFilesystemNode *AmigaOSFilesystemFactory::makeFileNodePath(const String &path) const { - return new AmigaOSFilesystemNode(path); -} diff --git a/backends/fs/amigaos4/AmigaOSFilesystemFactory.h b/backends/fs/amigaos4/AmigaOSFilesystemFactory.h deleted file mode 100644 index 8eea952831..0000000000 --- a/backends/fs/amigaos4/AmigaOSFilesystemFactory.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef AMIGAOSFILESYSTEMFACTORY_H_ -#define AMIGAOSFILESYSTEMFACTORY_H_ - -#include "backends/fs/AbstractFilesystemFactory.h" - -/** - * Creates AmigaOSFilesystemNode objects. - * - * Parts of this class are documented in the base interface class, AbstractFilesystemFactory. - */ -class AmigaOSFilesystemFactory : public AbstractFilesystemFactory { -public: - typedef Common::String String; - - /** - * Creates an instance of AmigaOSFilesystemFactory using the Singleton pattern. - * - * @return A unique instance of AmigaOSFilesytemFactory. - */ - static AmigaOSFilesystemFactory *instance(); - - /** - * Destructor. - */ - virtual ~AmigaOSFilesystemFactory() {}; - - virtual AbstractFilesystemNode *makeRootFileNode() const; - virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const; - virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const; - -protected: - AmigaOSFilesystemFactory() {}; - -private: - static AmigaOSFilesystemFactory *_instance; -}; - -#endif /*AMIGAOSFILESYSTEMFACTORY_H_*/ diff --git a/backends/fs/amigaos4/amigaos4-fs-factory.cpp b/backends/fs/amigaos4/amigaos4-fs-factory.cpp new file mode 100644 index 0000000000..abb0790c18 --- /dev/null +++ b/backends/fs/amigaos4/amigaos4-fs-factory.cpp @@ -0,0 +1,23 @@ +#include "backends/fs/amigaos4/amigaos4-fs-factory.h" +#include "backends/fs/amigaos4/amigaos4-fs.cpp" + +AmigaOSFilesystemFactory *AmigaOSFilesystemFactory::_instance = 0; + +AmigaOSFilesystemFactory *AmigaOSFilesystemFactory::instance(){ + if(_instance == 0){ + _instance = new AmigaOSFilesystemFactory(); + } + return _instance; +} + +AbstractFilesystemNode *AmigaOSFilesystemFactory::makeRootFileNode() const { + return new AmigaOSFilesystemNode(); +} + +AbstractFilesystemNode *AmigaOSFilesystemFactory::makeCurrentDirectoryFileNode() const { + return new AmigaOSFilesystemNode(); +} + +AbstractFilesystemNode *AmigaOSFilesystemFactory::makeFileNodePath(const String &path) const { + return new AmigaOSFilesystemNode(path); +} diff --git a/backends/fs/amigaos4/amigaos4-fs-factory.h b/backends/fs/amigaos4/amigaos4-fs-factory.h new file mode 100644 index 0000000000..4b34cc1954 --- /dev/null +++ b/backends/fs/amigaos4/amigaos4-fs-factory.h @@ -0,0 +1,33 @@ +#ifndef AMIGAOS_FILESYSTEM_FACTORY_H +#define AMIGAOS_FILESYSTEM_FACTORY_H + +#include "backends/fs/abstract-fs-factory.h" + +/** + * Creates AmigaOSFilesystemNode objects. + * + * Parts of this class are documented in the base interface class, AbstractFilesystemFactory. + */ +class AmigaOSFilesystemFactory : public AbstractFilesystemFactory { +public: + typedef Common::String String; + + /** + * Creates an instance of AmigaOSFilesystemFactory using the Singleton pattern. + * + * @return A unique instance of AmigaOSFilesytemFactory. + */ + static AmigaOSFilesystemFactory *instance(); + + virtual AbstractFilesystemNode *makeRootFileNode() const; + virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const; + virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const; + +protected: + AmigaOSFilesystemFactory() {}; + +private: + static AmigaOSFilesystemFactory *_instance; +}; + +#endif /*AMIGAOS_FILESYSTEM_FACTORY_H*/ diff --git a/backends/fs/dc/RoninCDFilesystemFactory.cpp b/backends/fs/dc/RoninCDFilesystemFactory.cpp deleted file mode 100644 index 1914745368..0000000000 --- a/backends/fs/dc/RoninCDFilesystemFactory.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include "backends/fs/dc/RoninCDFilesystemFactory.h" -#include "backends/fs/dc/dc-fs.cpp" - -RoninCDFilesystemFactory *RoninCDFilesystemFactory::_instance = 0; - -RoninCDFilesystemFactory *RoninCDFilesystemFactory::instance(){ - if(_instance == 0){ - _instance = new RoninCDFilesystemFactory(); - } - return _instance; -} - -AbstractFilesystemNode *RoninCDFilesystemFactory::makeRootFileNode() const { - return new RoninCDFilesystemNode(); -} - -AbstractFilesystemNode *RoninCDFilesystemFactory::makeCurrentDirectoryFileNode() const { - return new RoninCDFilesystemNode(); -} - -AbstractFilesystemNode *RoninCDFilesystemFactory::makeFileNodePath(const String &path) const { - return new RoninCDFilesystemNode(path, true); -} diff --git a/backends/fs/dc/RoninCDFilesystemFactory.h b/backends/fs/dc/RoninCDFilesystemFactory.h deleted file mode 100644 index a063ce1d6a..0000000000 --- a/backends/fs/dc/RoninCDFilesystemFactory.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef RONINCDFILESYSTEMFACTORY_H_ -#define RONINCDFILESYSTEMFACTORY_H_ - -#include "backends/fs/AbstractFilesystemFactory.h" - -/** - * Creates RoninCDFilesystemNode objects. - * - * Parts of this class are documented in the base interface class, AbstractFilesystemFactory. - */ -class RoninCDFilesystemFactory : public AbstractFilesystemFactory { -public: - typedef Common::String String; - - /** - * Creates an instance of RoninCDFilesystemFactory using the Singleton pattern. - * - * @return A unique instance of RoninCDFilesytemFactory. - */ - static RoninCDFilesystemFactory *instance(); - - /** - * Destructor. - */ - virtual ~RoninCDFilesystemFactory() {}; - - virtual AbstractFilesystemNode *makeRootFileNode() const; - virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const; - virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const; - -protected: - RoninCDFilesystemFactory() {}; - -private: - static RoninCDFilesystemFactory *_instance; -}; - -#endif /*RONINCDFILESYSTEMFACTORY_H_*/ diff --git a/backends/fs/dc/ronincd-fs-factory.cpp b/backends/fs/dc/ronincd-fs-factory.cpp new file mode 100644 index 0000000000..92b2c5f7bb --- /dev/null +++ b/backends/fs/dc/ronincd-fs-factory.cpp @@ -0,0 +1,23 @@ +#include "backends/fs/dc/ronincd-fs-factory.h" +#include "backends/fs/dc/dc-fs.cpp" + +RoninCDFilesystemFactory *RoninCDFilesystemFactory::_instance = 0; + +RoninCDFilesystemFactory *RoninCDFilesystemFactory::instance(){ + if(_instance == 0){ + _instance = new RoninCDFilesystemFactory(); + } + return _instance; +} + +AbstractFilesystemNode *RoninCDFilesystemFactory::makeRootFileNode() const { + return new RoninCDFilesystemNode(); +} + +AbstractFilesystemNode *RoninCDFilesystemFactory::makeCurrentDirectoryFileNode() const { + return new RoninCDFilesystemNode(); +} + +AbstractFilesystemNode *RoninCDFilesystemFactory::makeFileNodePath(const String &path) const { + return new RoninCDFilesystemNode(path, true); +} diff --git a/backends/fs/dc/ronincd-fs-factory.h b/backends/fs/dc/ronincd-fs-factory.h new file mode 100644 index 0000000000..02cfe66c82 --- /dev/null +++ b/backends/fs/dc/ronincd-fs-factory.h @@ -0,0 +1,33 @@ +#ifndef RONINCD_FILESYSTEM_FACTORY_H +#define RONINCD_FILESYSTEM_FACTORY_H + +#include "backends/fs/abstract-fs-factory.h" + +/** + * Creates RoninCDFilesystemNode objects. + * + * Parts of this class are documented in the base interface class, AbstractFilesystemFactory. + */ +class RoninCDFilesystemFactory : public AbstractFilesystemFactory { +public: + typedef Common::String String; + + /** + * Creates an instance of RoninCDFilesystemFactory using the Singleton pattern. + * + * @return A unique instance of RoninCDFilesytemFactory. + */ + static RoninCDFilesystemFactory *instance(); + + virtual AbstractFilesystemNode *makeRootFileNode() const; + virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const; + virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const; + +protected: + RoninCDFilesystemFactory() {}; + +private: + static RoninCDFilesystemFactory *_instance; +}; + +#endif /*RONINCD_FILESYSTEM_FACTORY_H*/ diff --git a/backends/fs/ds/DSFilesystemFactory.cpp b/backends/fs/ds/DSFilesystemFactory.cpp deleted file mode 100644 index 809dc0e5cf..0000000000 --- a/backends/fs/ds/DSFilesystemFactory.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include "backends/fs/ds/DSFilesystemFactory.h" -#include "backends/fs/ds/ds-fs.cpp" -#include "dsmain.h" //for the isGBAMPAvailable() function - -DSFilesystemFactory *DSFilesystemFactory::_instance = 0; - -DSFilesystemFactory *DSFilesystemFactory::instance(){ - if(_instance == 0){ - _instance = new DSFilesystemFactory(); - } - return _instance; -} - -AbstractFilesystemNode *DSFilesystemFactory::makeRootFileNode() const { - if (DS::isGBAMPAvailable()) { - return new DS::GBAMPFileSystemNode(); - } else { - return new DS::DSFileSystemNode(); - } -} - -AbstractFilesystemNode *DSFilesystemFactory::makeCurrentDirectoryFileNode() const { - if (DS::isGBAMPAvailable()) { - return new DS::GBAMPFileSystemNode(); - } else { - return new DS::DSFileSystemNode(); - } -} - -AbstractFilesystemNode *DSFilesystemFactory::makeFileNodePath(const String &path) const { - if (DS::isGBAMPAvailable()) { - return new DS::GBAMPFileSystemNode(path); - } else { - return new DS::DSFileSystemNode(path); - } -} diff --git a/backends/fs/ds/DSFilesystemFactory.h b/backends/fs/ds/DSFilesystemFactory.h deleted file mode 100644 index 6eaef1cd1e..0000000000 --- a/backends/fs/ds/DSFilesystemFactory.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef DSFILESYSTEMFACTORY_H_ -#define DSFILESYSTEMFACTORY_H_ - -#include "backends/fs/AbstractFilesystemFactory.h" - -/** - * Creates DSFilesystemNode objects. - * - * Parts of this class are documented in the base interface class, AbstractFilesystemFactory. - */ -class DSFilesystemFactory : public AbstractFilesystemFactory { -public: - typedef Common::String String; - - /** - * Creates an instance of DSFilesystemFactory using the Singleton pattern. - * - * @return A unique instance of DSFilesytemFactory. - */ - static DSFilesystemFactory *instance(); - - /** - * Destructor. - */ - virtual ~DSFilesystemFactory() {}; - - virtual AbstractFilesystemNode *makeRootFileNode() const; - virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const; - virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const; - -protected: - DSFilesystemFactory() {}; - -private: - static DSFilesystemFactory *_instance; -}; - -#endif /*DSFILESYSTEMFACTORY_H_*/ diff --git a/backends/fs/ds/ds-fs-factory.cpp b/backends/fs/ds/ds-fs-factory.cpp new file mode 100644 index 0000000000..1855fbc40d --- /dev/null +++ b/backends/fs/ds/ds-fs-factory.cpp @@ -0,0 +1,36 @@ +#include "backends/fs/ds/ds-fs-factory.h" +#include "backends/fs/ds/ds-fs.cpp" +#include "dsmain.h" //for the isGBAMPAvailable() function + +DSFilesystemFactory *DSFilesystemFactory::_instance = 0; + +DSFilesystemFactory *DSFilesystemFactory::instance(){ + if(_instance == 0){ + _instance = new DSFilesystemFactory(); + } + return _instance; +} + +AbstractFilesystemNode *DSFilesystemFactory::makeRootFileNode() const { + if (DS::isGBAMPAvailable()) { + return new DS::GBAMPFileSystemNode(); + } else { + return new DS::DSFileSystemNode(); + } +} + +AbstractFilesystemNode *DSFilesystemFactory::makeCurrentDirectoryFileNode() const { + if (DS::isGBAMPAvailable()) { + return new DS::GBAMPFileSystemNode(); + } else { + return new DS::DSFileSystemNode(); + } +} + +AbstractFilesystemNode *DSFilesystemFactory::makeFileNodePath(const String &path) const { + if (DS::isGBAMPAvailable()) { + return new DS::GBAMPFileSystemNode(path); + } else { + return new DS::DSFileSystemNode(path); + } +} diff --git a/backends/fs/ds/ds-fs-factory.h b/backends/fs/ds/ds-fs-factory.h new file mode 100644 index 0000000000..5e96edc390 --- /dev/null +++ b/backends/fs/ds/ds-fs-factory.h @@ -0,0 +1,33 @@ +#ifndef DS_FILESYSTEM_FACTORY_H +#define DS_FILESYSTEM_FACTORY_H + +#include "backends/fs/abstract-fs-factory.h" + +/** + * Creates DSFilesystemNode objects. + * + * Parts of this class are documented in the base interface class, AbstractFilesystemFactory. + */ +class DSFilesystemFactory : public AbstractFilesystemFactory { +public: + typedef Common::String String; + + /** + * Creates an instance of DSFilesystemFactory using the Singleton pattern. + * + * @return A unique instance of DSFilesytemFactory. + */ + static DSFilesystemFactory *instance(); + + virtual AbstractFilesystemNode *makeRootFileNode() const; + virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const; + virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const; + +protected: + DSFilesystemFactory() {}; + +private: + static DSFilesystemFactory *_instance; +}; + +#endif /*DS_FILESYSTEM_FACTORY_H*/ diff --git a/backends/fs/fs-factory-maker.cpp b/backends/fs/fs-factory-maker.cpp new file mode 100644 index 0000000000..636a39b5e3 --- /dev/null +++ b/backends/fs/fs-factory-maker.cpp @@ -0,0 +1,113 @@ +#include "backends/fs/abstract-fs-factory.h" + +/* + * All the following includes choose, at compile time, which specific backend will be used + * during the execution of the ScummVM. + * + * It has to be done this way because not all the necessary libraries will be available in + * all build environments. Additionally, this results in smaller binaries. + */ +#if defined(__amigaos4__) + #include "backends/fs/amigaos4/amigaos4-fs-factory.cpp" +#endif + +#if defined(__DC__) + #include "backends/fs/dc/ronincd-fs-factory.cpp" +#endif + +#if defined(__DS__) + #include "backends/fs/ds/ds-fs-factory.cpp" +#endif + +#if defined(__GP32__) + #include "backends/fs/gp32/gp32-fs-factory.cpp" +#endif + +#if defined(__MORPHOS__) + #include "backends/fs/morphos/abox-fs-factory.cpp" +#endif + +#if defined(PALMOS_MODE) + #include "backends/fs/palmos/palmos-fs-factory.cpp" +#endif + +#if defined(__PLAYSTATION2__) + #include "backends/fs/ps2/ps2-fs-factory.cpp" +#endif + +#if defined(__PSP__) + #include "backends/fs/psp/psp-fs-factory.cpp" +#endif + +#if defined(__SYMBIAN32__) + #include "backends/fs/symbian/symbian-fs-factory.cpp" +#endif + +#if defined(UNIX) + #include "backends/fs/posix/posix-fs-factory.cpp" +#endif + +#if defined(WIN32) + #include "backends/fs/windows/windows-fs-factory.cpp" +#endif + +/** + * Creates concrete FilesystemFactory objects depending on the current architecture. + */ +class FilesystemFactoryMaker { +public: + + /** + * Returns the correct concrete factory depending on the current build architecture. + */ + static AbstractFilesystemFactory *makeFactory(); + +protected: + FilesystemFactoryMaker() {}; // avoid instances of this class +}; + +AbstractFilesystemFactory *FilesystemFactoryMaker::makeFactory(){ + #if defined(__amigaos4__) + return AmigaOSFilesystemFactory::instance(); + #endif + + #if defined(__DC__) + return RoninCDFilesystemFactory::instance(); + #endif + + #if defined(__DS__) + return DSFilesystemFactory::instance(); + #endif + + #if defined(__GP32__) + return GP32FilesystemFactory::instance(); + #endif + + #if defined(__MORPHOS__) + return ABoxFilesystemFactory::instance(); + #endif + + #if defined(PALMOS_MODE) + return PalmOSFilesystemFactory::instance(); + #endif + + #if defined(__PLAYSTATION2__) + return Ps2FilesystemFactory::instance(); + #endif + + #if defined(__PSP__) + return PSPFilesystemFactory::instance(); + #endif + + #if defined(__SYMBIAN32__) + return SymbianFilesystemFactory::instance(); + #endif + + #if defined(UNIX) + return POSIXFilesystemFactory::instance(); + #endif + + #if defined(WIN32) + return WindowsFilesystemFactory::instance(); + #endif +} diff --git a/backends/fs/gp32/GP32FilesystemFactory.cpp b/backends/fs/gp32/GP32FilesystemFactory.cpp deleted file mode 100644 index fa98079a8d..0000000000 --- a/backends/fs/gp32/GP32FilesystemFactory.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include "backends/fs/gp32/GP32FilesystemFactory.h" -#include "backends/fs/gp32/gp32-fs.cpp" - -GP32FilesystemFactory *GP32FilesystemFactory::_instance = 0; - -GP32FilesystemFactory *GP32FilesystemFactory::instance(){ - if(_instance == 0){ - _instance = new GP32FilesystemFactory(); - } - return _instance; -} - -AbstractFilesystemNode *GP32FilesystemFactory::makeRootFileNode() const { - return new GP32FilesystemNode(); -} - -AbstractFilesystemNode *GP32FilesystemFactory::makeCurrentDirectoryFileNode() const { - return new GP32FilesystemNode(); -} - -AbstractFilesystemNode *GP32FilesystemFactory::makeFileNodePath(const String &path) const { - return new GP32FilesystemNode(path); -} diff --git a/backends/fs/gp32/GP32FilesystemFactory.h b/backends/fs/gp32/GP32FilesystemFactory.h deleted file mode 100644 index d31642acd2..0000000000 --- a/backends/fs/gp32/GP32FilesystemFactory.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef GP32FILESYSTEMFACTORY_H_ -#define GP32FILESYSTEMFACTORY_H_ - -#include "backends/fs/AbstractFilesystemFactory.h" - -/** - * Creates GP32FilesystemNode objects. - * - * Parts of this class are documented in the base interface class, AbstractFilesystemFactory. - */ -class GP32FilesystemFactory : public AbstractFilesystemFactory { -public: - typedef Common::String String; - - /** - * Creates an instance of GP32FilesystemFactory using the Singleton pattern. - * - * @return A unique instance of GP32FilesytemFactory. - */ - static GP32FilesystemFactory *instance(); - - /** - * Destructor. - */ - virtual ~GP32FilesystemFactory() {}; - - virtual AbstractFilesystemNode *makeRootFileNode() const; - virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const; - virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const; - -protected: - GP32FilesystemFactory() {}; - -private: - static GP32FilesystemFactory *_instance; -}; - -#endif /*GP32FILESYSTEMFACTORY_H_*/ diff --git a/backends/fs/gp32/gp32-fs-factory.cpp b/backends/fs/gp32/gp32-fs-factory.cpp new file mode 100644 index 0000000000..fc19bdf1cf --- /dev/null +++ b/backends/fs/gp32/gp32-fs-factory.cpp @@ -0,0 +1,23 @@ +#include "backends/fs/gp32/gp32-fs-factory.h" +#include "backends/fs/gp32/gp32-fs.cpp" + +GP32FilesystemFactory *GP32FilesystemFactory::_instance = 0; + +GP32FilesystemFactory *GP32FilesystemFactory::instance(){ + if(_instance == 0){ + _instance = new GP32FilesystemFactory(); + } + return _instance; +} + +AbstractFilesystemNode *GP32FilesystemFactory::makeRootFileNode() const { + return new GP32FilesystemNode(); +} + +AbstractFilesystemNode *GP32FilesystemFactory::makeCurrentDirectoryFileNode() const { + return new GP32FilesystemNode(); +} + +AbstractFilesystemNode *GP32FilesystemFactory::makeFileNodePath(const String &path) const { + return new GP32FilesystemNode(path); +} diff --git a/backends/fs/gp32/gp32-fs-factory.h b/backends/fs/gp32/gp32-fs-factory.h new file mode 100644 index 0000000000..1b34597d84 --- /dev/null +++ b/backends/fs/gp32/gp32-fs-factory.h @@ -0,0 +1,33 @@ +#ifndef GP32_FILESYSTEM_FACTORY_H +#define GP32_FILESYSTEM_FACTORY_H + +#include "backends/fs/abstract-fs-factory.h" + +/** + * Creates GP32FilesystemNode objects. + * + * Parts of this class are documented in the base interface class, AbstractFilesystemFactory. + */ +class GP32FilesystemFactory : public AbstractFilesystemFactory { +public: + typedef Common::String String; + + /** + * Creates an instance of GP32FilesystemFactory using the Singleton pattern. + * + * @return A unique instance of GP32FilesytemFactory. + */ + static GP32FilesystemFactory *instance(); + + virtual AbstractFilesystemNode *makeRootFileNode() const; + virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const; + virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const; + +protected: + GP32FilesystemFactory() {}; + +private: + static GP32FilesystemFactory *_instance; +}; + +#endif /*GP32_FILESYSTEM_FACTORY_H*/ diff --git a/backends/fs/morphos/ABoxFilesystemFactory.cpp b/backends/fs/morphos/ABoxFilesystemFactory.cpp deleted file mode 100644 index 02d954ee74..0000000000 --- a/backends/fs/morphos/ABoxFilesystemFactory.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include "backends/fs/morphos/ABoxFilesystemFactory.h" -#include "backends/fs/morphos/abox-fs.cpp" - -ABoxFilesystemFactory *ABoxFilesystemFactory::_instance = 0; - -ABoxFilesystemFactory *ABoxFilesystemFactory::instance(){ - if(_instance == 0){ - _instance = new ABoxFilesystemFactory(); - } - return _instance; -} - -AbstractFilesystemNode *ABoxFilesystemFactory::makeRootFileNode() const { - return new ABoxFilesystemNode(); -} - -AbstractFilesystemNode *ABoxFilesystemFactory::makeCurrentDirectoryFileNode() const { - return new ABoxFilesystemNode(); -} - -AbstractFilesystemNode *ABoxFilesystemFactory::makeFileNodePath(const String &path) const { - return new ABoxFilesystemNode(path); -} diff --git a/backends/fs/morphos/ABoxFilesystemFactory.h b/backends/fs/morphos/ABoxFilesystemFactory.h deleted file mode 100644 index c8fc0b3c19..0000000000 --- a/backends/fs/morphos/ABoxFilesystemFactory.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef ABOXFILESYSTEMFACTORY_H_ -#define ABOXFILESYSTEMFACTORY_H_ - -#include "backends/fs/AbstractFilesystemFactory.h" - -/** - * Creates ABoxFilesystemNode objects. - * - * Parts of this class are documented in the base interface class, AbstractFilesystemFactory. - */ -class ABoxFilesystemFactory : public AbstractFilesystemFactory { -public: - typedef Common::String String; - - /** - * Creates an instance of ABoxFilesystemFactory using the Singleton pattern. - * - * @return A unique instance of ABoxFilesytemFactory. - */ - static ABoxFilesystemFactory *instance(); - - /** - * Destructor. - */ - virtual ~ABoxFilesystemFactory() {}; - - virtual AbstractFilesystemNode *makeRootFileNode() const; - virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const; - virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const; - -protected: - ABoxFilesystemFactory() {}; - -private: - static ABoxFilesystemFactory *_instance; -}; - -#endif /*ABOXFILESYSTEMFACTORY_H_*/ diff --git a/backends/fs/morphos/abox-fs-factory.cpp b/backends/fs/morphos/abox-fs-factory.cpp new file mode 100644 index 0000000000..4689a6a42f --- /dev/null +++ b/backends/fs/morphos/abox-fs-factory.cpp @@ -0,0 +1,23 @@ +#include "backends/fs/morphos/abox-fs-factory.h" +#include "backends/fs/morphos/abox-fs.cpp" + +ABoxFilesystemFactory *ABoxFilesystemFactory::_instance = 0; + +ABoxFilesystemFactory *ABoxFilesystemFactory::instance(){ + if(_instance == 0){ + _instance = new ABoxFilesystemFactory(); + } + return _instance; +} + +AbstractFilesystemNode *ABoxFilesystemFactory::makeRootFileNode() const { + return new ABoxFilesystemNode(); +} + +AbstractFilesystemNode *ABoxFilesystemFactory::makeCurrentDirectoryFileNode() const { + return new ABoxFilesystemNode(); +} + +AbstractFilesystemNode *ABoxFilesystemFactory::makeFileNodePath(const String &path) const { + return new ABoxFilesystemNode(path); +} diff --git a/backends/fs/morphos/abox-fs-factory.h b/backends/fs/morphos/abox-fs-factory.h new file mode 100644 index 0000000000..f6cf7774c5 --- /dev/null +++ b/backends/fs/morphos/abox-fs-factory.h @@ -0,0 +1,33 @@ +#ifndef ABOX_FILESYSTEM_FACTORY_H +#define ABOX_FILESYSTEM_FACTORY_H + +#include "backends/fs/abstract-fs-factory.h" + +/** + * Creates ABoxFilesystemNode objects. + * + * Parts of this class are documented in the base interface class, AbstractFilesystemFactory. + */ +class ABoxFilesystemFactory : public AbstractFilesystemFactory { +public: + typedef Common::String String; + + /** + * Creates an instance of ABoxFilesystemFactory using the Singleton pattern. + * + * @return A unique instance of ABoxFilesytemFactory. + */ + static ABoxFilesystemFactory *instance(); + + virtual AbstractFilesystemNode *makeRootFileNode() const; + virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const; + virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const; + +protected: + ABoxFilesystemFactory() {}; + +private: + static ABoxFilesystemFactory *_instance; +}; + +#endif /*ABOX_FILESYSTEM_FACTORY_H*/ diff --git a/backends/fs/palmos/PalmOSFilesystemFactory.cpp b/backends/fs/palmos/PalmOSFilesystemFactory.cpp deleted file mode 100644 index 15240d2397..0000000000 --- a/backends/fs/palmos/PalmOSFilesystemFactory.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include "backends/fs/palmos/PalmOSFilesystemFactory.h" -#include "backends/fs/palmos/palmos-fs.cpp" - -PalmOSFilesystemFactory *PalmOSFilesystemFactory::_instance = 0; - -PalmOSFilesystemFactory *PalmOSFilesystemFactory::instance(){ - if(_instance == 0){ - _instance = new PalmOSFilesystemFactory(); - } - return _instance; -} - -AbstractFilesystemNode *PalmOSFilesystemFactory::makeRootFileNode() const { - return new PalmOSFilesystemNode(); -} - -AbstractFilesystemNode *PalmOSFilesystemFactory::makeCurrentDirectoryFileNode() const { - return new PalmOSFilesystemNode(); -} - -AbstractFilesystemNode *PalmOSFilesystemFactory::makeFileNodePath(const String &path) const { - return new PalmOSFilesystemNode(path); -} diff --git a/backends/fs/palmos/PalmOSFilesystemFactory.h b/backends/fs/palmos/PalmOSFilesystemFactory.h deleted file mode 100644 index dd1f31b3c8..0000000000 --- a/backends/fs/palmos/PalmOSFilesystemFactory.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef PALMOSFILESYSTEMFACTORY_H_ -#define PALMOSFILESYSTEMFACTORY_H_ - -#include "backends/fs/AbstractFilesystemFactory.h" - -/** - * Creates PalmOSFilesystemNode objects. - * - * Parts of this class are documented in the base interface class, AbstractFilesystemFactory. - */ -class PalmOSFilesystemFactory : public AbstractFilesystemFactory { -public: - typedef Common::String String; - - /** - * Creates an instance of PalmOSFilesystemFactory using the Singleton pattern. - * - * @return A unique instance of PalmOSFilesytemFactory. - */ - static PalmOSFilesystemFactory *instance(); - - /** - * Destructor. - */ - virtual ~PalmOSFilesystemFactory() {}; - - virtual AbstractFilesystemNode *makeRootFileNode() const; - virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const; - virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const; - -protected: - PalmOSFilesystemFactory() {}; - -private: - static PalmOSFilesystemFactory *_instance; -}; - -#endif /*PALMOSFILESYSTEMFACTORY_H_*/ diff --git a/backends/fs/palmos/palmos-fs-factory.cpp b/backends/fs/palmos/palmos-fs-factory.cpp new file mode 100644 index 0000000000..6be7021f77 --- /dev/null +++ b/backends/fs/palmos/palmos-fs-factory.cpp @@ -0,0 +1,23 @@ +#include "backends/fs/palmos/palmos-fs-factory.h" +#include "backends/fs/palmos/palmos-fs.cpp" + +PalmOSFilesystemFactory *PalmOSFilesystemFactory::_instance = 0; + +PalmOSFilesystemFactory *PalmOSFilesystemFactory::instance(){ + if(_instance == 0){ + _instance = new PalmOSFilesystemFactory(); + } + return _instance; +} + +AbstractFilesystemNode *PalmOSFilesystemFactory::makeRootFileNode() const { + return new PalmOSFilesystemNode(); +} + +AbstractFilesystemNode *PalmOSFilesystemFactory::makeCurrentDirectoryFileNode() const { + return new PalmOSFilesystemNode(); +} + +AbstractFilesystemNode *PalmOSFilesystemFactory::makeFileNodePath(const String &path) const { + return new PalmOSFilesystemNode(path); +} diff --git a/backends/fs/palmos/palmos-fs-factory.h b/backends/fs/palmos/palmos-fs-factory.h new file mode 100644 index 0000000000..618a1965d9 --- /dev/null +++ b/backends/fs/palmos/palmos-fs-factory.h @@ -0,0 +1,33 @@ +#ifndef PALMOS_FILESYSTEM_FACTORY_H +#define PALMOS_FILESYSTEM_FACTORY_H + +#include "backends/fs/abstract-fs-factory.h" + +/** + * Creates PalmOSFilesystemNode objects. + * + * Parts of this class are documented in the base interface class, AbstractFilesystemFactory. + */ +class PalmOSFilesystemFactory : public AbstractFilesystemFactory { +public: + typedef Common::String String; + + /** + * Creates an instance of PalmOSFilesystemFactory using the Singleton pattern. + * + * @return A unique instance of PalmOSFilesytemFactory. + */ + static PalmOSFilesystemFactory *instance(); + + virtual AbstractFilesystemNode *makeRootFileNode() const; + virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const; + virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const; + +protected: + PalmOSFilesystemFactory() {}; + +private: + static PalmOSFilesystemFactory *_instance; +}; + +#endif /*PALMOS_FILESYSTEM_FACTORY_H*/ diff --git a/backends/fs/posix/POSIXFilesystemFactory.cpp b/backends/fs/posix/POSIXFilesystemFactory.cpp deleted file mode 100644 index 9a13c37c30..0000000000 --- a/backends/fs/posix/POSIXFilesystemFactory.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#include "backends/fs/posix/POSIXFilesystemFactory.h" -#include "backends/fs/posix/posix-fs.cpp" - -POSIXFilesystemFactory *POSIXFilesystemFactory::_instance = 0; - -POSIXFilesystemFactory *POSIXFilesystemFactory::instance(){ - if(_instance == 0){ - _instance = new POSIXFilesystemFactory(); - } - return _instance; -} - -AbstractFilesystemNode *POSIXFilesystemFactory::makeRootFileNode() const { - return new POSIXFilesystemNode(); -} - -AbstractFilesystemNode *POSIXFilesystemFactory::makeCurrentDirectoryFileNode() const { - char buf[MAXPATHLEN]; - getcwd(buf, MAXPATHLEN); - return new POSIXFilesystemNode(buf, true); -} - -AbstractFilesystemNode *POSIXFilesystemFactory::makeFileNodePath(const String &path) const { - return new POSIXFilesystemNode(path, true); -} diff --git a/backends/fs/posix/POSIXFilesystemFactory.h b/backends/fs/posix/POSIXFilesystemFactory.h deleted file mode 100644 index b471460445..0000000000 --- a/backends/fs/posix/POSIXFilesystemFactory.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef POSIXFILESYSTEMFACTORY_H_ -#define POSIXFILESYSTEMFACTORY_H_ - -#include "backends/fs/AbstractFilesystemFactory.h" - -/** - * Creates POSIXFilesystemNode objects. - * - * Parts of this class are documented in the base interface class, AbstractFilesystemFactory. - */ -class POSIXFilesystemFactory : public AbstractFilesystemFactory { -public: - typedef Common::String String; - - /** - * Creates an instance of POSIXFilesystemFactory using the Singleton pattern. - * - * @return A unique instance of POSIXFilesytemFactory. - */ - static POSIXFilesystemFactory *instance(); - - /** - * Destructor. - */ - virtual ~POSIXFilesystemFactory() {}; - - virtual AbstractFilesystemNode *makeRootFileNode() const; - virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const; - virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const; - -protected: - POSIXFilesystemFactory() {}; - -private: - static POSIXFilesystemFactory *_instance; -}; - -#endif /*POSIXFILESYSTEMFACTORY_H_*/ diff --git a/backends/fs/posix/posix-fs-factory.cpp b/backends/fs/posix/posix-fs-factory.cpp new file mode 100644 index 0000000000..b302bb31e8 --- /dev/null +++ b/backends/fs/posix/posix-fs-factory.cpp @@ -0,0 +1,25 @@ +#include "backends/fs/posix/posix-fs-factory.h" +#include "backends/fs/posix/posix-fs.cpp" + +POSIXFilesystemFactory *POSIXFilesystemFactory::_instance = 0; + +POSIXFilesystemFactory *POSIXFilesystemFactory::instance(){ + if(_instance == 0){ + _instance = new POSIXFilesystemFactory(); + } + return _instance; +} + +AbstractFilesystemNode *POSIXFilesystemFactory::makeRootFileNode() const { + return new POSIXFilesystemNode(); +} + +AbstractFilesystemNode *POSIXFilesystemFactory::makeCurrentDirectoryFileNode() const { + char buf[MAXPATHLEN]; + getcwd(buf, MAXPATHLEN); + return new POSIXFilesystemNode(buf, true); +} + +AbstractFilesystemNode *POSIXFilesystemFactory::makeFileNodePath(const String &path) const { + return new POSIXFilesystemNode(path, true); +} diff --git a/backends/fs/posix/posix-fs-factory.h b/backends/fs/posix/posix-fs-factory.h new file mode 100644 index 0000000000..5195491b95 --- /dev/null +++ b/backends/fs/posix/posix-fs-factory.h @@ -0,0 +1,33 @@ +#ifndef POSIX_FILESYSTEM_FACTORY_H +#define POSIX_FILESYSTEM_FACTORY_H + +#include "backends/fs/abstract-fs-factory.h" + +/** + * Creates POSIXFilesystemNode objects. + * + * Parts of this class are documented in the base interface class, AbstractFilesystemFactory. + */ +class POSIXFilesystemFactory : public AbstractFilesystemFactory { +public: + typedef Common::String String; + + /** + * Creates an instance of POSIXFilesystemFactory using the Singleton pattern. + * + * @return A unique instance of POSIXFilesytemFactory. + */ + static POSIXFilesystemFactory *instance(); + + virtual AbstractFilesystemNode *makeRootFileNode() const; + virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const; + virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const; + +protected: + POSIXFilesystemFactory() {}; + +private: + static POSIXFilesystemFactory *_instance; +}; + +#endif /*POSIX_FILESYSTEM_FACTORY_H*/ diff --git a/backends/fs/ps2/Ps2FilesystemFactory.cpp b/backends/fs/ps2/Ps2FilesystemFactory.cpp deleted file mode 100644 index c07387eae1..0000000000 --- a/backends/fs/ps2/Ps2FilesystemFactory.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include "backends/fs/ps2/Ps2FilesystemFactory.h" -#include "backends/fs/ps2/ps2-fs.cpp" - -Ps2FilesystemFactory *Ps2FilesystemFactory::_instance = 0; - -Ps2FilesystemFactory *Ps2FilesystemFactory::instance(){ - if(_instance == 0){ - _instance = new Ps2FilesystemFactory(); - } - return _instance; -} - -AbstractFilesystemNode *Ps2FilesystemFactory::makeRootFileNode() const { - return new Ps2FilesystemNode(); -} - -AbstractFilesystemNode *Ps2FilesystemFactory::makeCurrentDirectoryFileNode() const { - return new Ps2FilesystemNode(); -} - -AbstractFilesystemNode *Ps2FilesystemFactory::makeFileNodePath(const String &path) const { - return new Ps2FilesystemNode(path); -} diff --git a/backends/fs/ps2/Ps2FilesystemFactory.h b/backends/fs/ps2/Ps2FilesystemFactory.h deleted file mode 100644 index e394865e80..0000000000 --- a/backends/fs/ps2/Ps2FilesystemFactory.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef PS2FILESYSTEMFACTORY_H_ -#define PS2FILESYSTEMFACTORY_H_ - -#include "backends/fs/AbstractFilesystemFactory.h" - -/** - * Creates PS2FilesystemNode objects. - * - * Parts of this class are documented in the base interface class, AbstractFilesystemFactory. - */ -class Ps2FilesystemFactory : public AbstractFilesystemFactory { -public: - typedef Common::String String; - - /** - * Creates an instance of Ps2FilesystemFactory using the Singleton pattern. - * - * @return A unique instance of Ps2FilesytemFactory. - */ - static Ps2FilesystemFactory *instance(); - - /** - * Destructor. - */ - virtual ~Ps2FilesystemFactory() {}; - - virtual AbstractFilesystemNode *makeRootFileNode() const; - virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const; - virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const; - -protected: - Ps2FilesystemFactory() {}; - -private: - static Ps2FilesystemFactory *_instance; -}; - -#endif /*PS2FILESYSTEMFACTORY_H_*/ diff --git a/backends/fs/ps2/ps2-fs-factory.cpp b/backends/fs/ps2/ps2-fs-factory.cpp new file mode 100644 index 0000000000..726eb87c6f --- /dev/null +++ b/backends/fs/ps2/ps2-fs-factory.cpp @@ -0,0 +1,23 @@ +#include "backends/fs/ps2/ps2-fs-factory.h" +#include "backends/fs/ps2/ps2-fs.cpp" + +Ps2FilesystemFactory *Ps2FilesystemFactory::_instance = 0; + +Ps2FilesystemFactory *Ps2FilesystemFactory::instance(){ + if(_instance == 0){ + _instance = new Ps2FilesystemFactory(); + } + return _instance; +} + +AbstractFilesystemNode *Ps2FilesystemFactory::makeRootFileNode() const { + return new Ps2FilesystemNode(); +} + +AbstractFilesystemNode *Ps2FilesystemFactory::makeCurrentDirectoryFileNode() const { + return new Ps2FilesystemNode(); +} + +AbstractFilesystemNode *Ps2FilesystemFactory::makeFileNodePath(const String &path) const { + return new Ps2FilesystemNode(path); +} diff --git a/backends/fs/ps2/ps2-fs-factory.h b/backends/fs/ps2/ps2-fs-factory.h new file mode 100644 index 0000000000..de7ada6ba3 --- /dev/null +++ b/backends/fs/ps2/ps2-fs-factory.h @@ -0,0 +1,33 @@ +#ifndef PS2_FILESYSTEM_FACTORY_H +#define PS2_FILESYSTEM_FACTORY_H + +#include "backends/fs/abstract-fs-factory.h" + +/** + * Creates PS2FilesystemNode objects. + * + * Parts of this class are documented in the base interface class, AbstractFilesystemFactory. + */ +class Ps2FilesystemFactory : public AbstractFilesystemFactory { +public: + typedef Common::String String; + + /** + * Creates an instance of Ps2FilesystemFactory using the Singleton pattern. + * + * @return A unique instance of Ps2FilesytemFactory. + */ + static Ps2FilesystemFactory *instance(); + + virtual AbstractFilesystemNode *makeRootFileNode() const; + virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const; + virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const; + +protected: + Ps2FilesystemFactory() {}; + +private: + static Ps2FilesystemFactory *_instance; +}; + +#endif /*PS2_FILESYSTEM_FACTORY_H*/ diff --git a/backends/fs/psp/PSPFilesystemFactory.cpp b/backends/fs/psp/PSPFilesystemFactory.cpp deleted file mode 100644 index 5a3802c10a..0000000000 --- a/backends/fs/psp/PSPFilesystemFactory.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include "backends/fs/psp/PSPFilesystemFactory.h" -#include "backends/fs/psp/psp_fs.cpp" - -PSPFilesystemFactory *PSPFilesystemFactory::_instance = 0; - -PSPFilesystemFactory *PSPFilesystemFactory::instance(){ - if(_instance == 0){ - _instance = new PSPFilesystemFactory(); - } - return _instance; -} - -AbstractFilesystemNode *PSPFilesystemFactory::makeRootFileNode() const { - return new PSPFilesystemNode(); -} - -AbstractFilesystemNode *PSPFilesystemFactory::makeCurrentDirectoryFileNode() const { - return new PSPFilesystemNode(); -} - -AbstractFilesystemNode *PSPFilesystemFactory::makeFileNodePath(const String &path) const { - return new PSPFilesystemNode(path, true); -} diff --git a/backends/fs/psp/PSPFilesystemFactory.h b/backends/fs/psp/PSPFilesystemFactory.h deleted file mode 100644 index 70358c90ed..0000000000 --- a/backends/fs/psp/PSPFilesystemFactory.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef PSPFILESYSTEMFACTORY_H_ -#define PSPFILESYSTEMFACTORY_H_ - -#include "backends/fs/AbstractFilesystemFactory.h" - -/** - * Creates PSPFilesystemNode objects. - * - * Parts of this class are documented in the base interface class, AbstractFilesystemFactory. - */ -class PSPFilesystemFactory : public AbstractFilesystemFactory { -public: - typedef Common::String String; - - /** - * Creates an instance of PSPFilesystemFactory using the Singleton pattern. - * - * @return A unique instance of PSPFilesytemFactory. - */ - static PSPFilesystemFactory *instance(); - - /** - * Destructor. - */ - virtual ~PSPFilesystemFactory() {}; - - virtual AbstractFilesystemNode *makeRootFileNode() const; - virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const; - virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const; - -protected: - PSPFilesystemFactory() {}; - -private: - static PSPFilesystemFactory *_instance; -}; - -#endif /*PSPFILESYSTEMFACTORY_H_*/ diff --git a/backends/fs/psp/psp-fs-factory.cpp b/backends/fs/psp/psp-fs-factory.cpp new file mode 100644 index 0000000000..2a0307d3f4 --- /dev/null +++ b/backends/fs/psp/psp-fs-factory.cpp @@ -0,0 +1,23 @@ +#include "backends/fs/psp/psp-fs-factory.h" +#include "backends/fs/psp/psp_fs.cpp" + +PSPFilesystemFactory *PSPFilesystemFactory::_instance = 0; + +PSPFilesystemFactory *PSPFilesystemFactory::instance(){ + if(_instance == 0){ + _instance = new PSPFilesystemFactory(); + } + return _instance; +} + +AbstractFilesystemNode *PSPFilesystemFactory::makeRootFileNode() const { + return new PSPFilesystemNode(); +} + +AbstractFilesystemNode *PSPFilesystemFactory::makeCurrentDirectoryFileNode() const { + return new PSPFilesystemNode(); +} + +AbstractFilesystemNode *PSPFilesystemFactory::makeFileNodePath(const String &path) const { + return new PSPFilesystemNode(path, true); +} diff --git a/backends/fs/psp/psp-fs-factory.h b/backends/fs/psp/psp-fs-factory.h new file mode 100644 index 0000000000..05388fa697 --- /dev/null +++ b/backends/fs/psp/psp-fs-factory.h @@ -0,0 +1,33 @@ +#ifndef PSP_FILESYSTEM_FACTORY_H +#define PSP_FILESYSTEM_FACTORY_H + +#include "backends/fs/abstract-fs-factory.h" + +/** + * Creates PSPFilesystemNode objects. + * + * Parts of this class are documented in the base interface class, AbstractFilesystemFactory. + */ +class PSPFilesystemFactory : public AbstractFilesystemFactory { +public: + typedef Common::String String; + + /** + * Creates an instance of PSPFilesystemFactory using the Singleton pattern. + * + * @return A unique instance of PSPFilesytemFactory. + */ + static PSPFilesystemFactory *instance(); + + virtual AbstractFilesystemNode *makeRootFileNode() const; + virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const; + virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const; + +protected: + PSPFilesystemFactory() {}; + +private: + static PSPFilesystemFactory *_instance; +}; + +#endif /*PSP_FILESYSTEM_FACTORY_H*/ diff --git a/backends/fs/symbian/SymbianFilesystemFactory.cpp b/backends/fs/symbian/SymbianFilesystemFactory.cpp deleted file mode 100644 index 07da19629c..0000000000 --- a/backends/fs/symbian/SymbianFilesystemFactory.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#include "backends/fs/symbian/SymbianFilesystemFactory.h" -#include "backends/fs/symbian/symbian-fs.cpp" - -SymbianFilesystemFactory *SymbianFilesystemFactory::_instance = 0; - -SymbianFilesystemFactory *SymbianFilesystemFactory::instance(){ - if(_instance == 0){ - _instance = new SymbianFilesystemFactory(); - } - return _instance; -} - -AbstractFilesystemNode *SymbianFilesystemFactory::makeRootFileNode() const { - return new SymbianFilesystemNode(true); -} - -AbstractFilesystemNode *SymbianFilesystemFactory::makeCurrentDirectoryFileNode() const { - char path[MAXPATHLEN]; - getcwd(path, MAXPATHLEN); - return new SymbianFilesystemNode(path); -} - -AbstractFilesystemNode *SymbianFilesystemFactory::makeFileNodePath(const String &path) const { - return new SymbianFilesystemNode(path); -} diff --git a/backends/fs/symbian/SymbianFilesystemFactory.h b/backends/fs/symbian/SymbianFilesystemFactory.h deleted file mode 100644 index b1d4b81250..0000000000 --- a/backends/fs/symbian/SymbianFilesystemFactory.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef SYMBIANFILESYSTEMFACTORY_H_ -#define SYMBIANFILESYSTEMFACTORY_H_ - -#include "backends/fs/AbstractFilesystemFactory.h" - -/** - * Creates SymbianFilesystemNode objects. - * - * Parts of this class are documented in the base interface class, AbstractFilesystemFactory. - */ -class SymbianFilesystemFactory : public AbstractFilesystemFactory { -public: - typedef Common::String String; - - /** - * Creates an instance of SymbianFilesystemFactory using the Singleton pattern. - * - * @return A unique instance of SymbianFilesytemFactory. - */ - static SymbianFilesystemFactory *instance(); - - /** - * Destructor. - */ - virtual ~SymbianFilesystemFactory() {}; - - virtual AbstractFilesystemNode *makeRootFileNode() const; - virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const; - virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const; - -protected: - SymbianFilesystemFactory() {}; - -private: - static SymbianFilesystemFactory *_instance; -}; - -#endif /*SYMBIANFILESYSTEMFACTORY_H_*/ diff --git a/backends/fs/symbian/symbian-fs-factory.cpp b/backends/fs/symbian/symbian-fs-factory.cpp new file mode 100644 index 0000000000..f3eb552159 --- /dev/null +++ b/backends/fs/symbian/symbian-fs-factory.cpp @@ -0,0 +1,25 @@ +#include "backends/fs/symbian/symbian-fs-factory.h" +#include "backends/fs/symbian/symbian-fs.cpp" + +SymbianFilesystemFactory *SymbianFilesystemFactory::_instance = 0; + +SymbianFilesystemFactory *SymbianFilesystemFactory::instance(){ + if(_instance == 0){ + _instance = new SymbianFilesystemFactory(); + } + return _instance; +} + +AbstractFilesystemNode *SymbianFilesystemFactory::makeRootFileNode() const { + return new SymbianFilesystemNode(true); +} + +AbstractFilesystemNode *SymbianFilesystemFactory::makeCurrentDirectoryFileNode() const { + char path[MAXPATHLEN]; + getcwd(path, MAXPATHLEN); + return new SymbianFilesystemNode(path); +} + +AbstractFilesystemNode *SymbianFilesystemFactory::makeFileNodePath(const String &path) const { + return new SymbianFilesystemNode(path); +} diff --git a/backends/fs/symbian/symbian-fs-factory.h b/backends/fs/symbian/symbian-fs-factory.h new file mode 100644 index 0000000000..4bbac728cb --- /dev/null +++ b/backends/fs/symbian/symbian-fs-factory.h @@ -0,0 +1,33 @@ +#ifndef SYMBIAN_FILESYSTEM_FACTORY_H +#define SYMBIAN_FILESYSTEM_FACTORY_H + +#include "backends/fs/abstract-fs-factory.h" + +/** + * Creates SymbianFilesystemNode objects. + * + * Parts of this class are documented in the base interface class, AbstractFilesystemFactory. + */ +class SymbianFilesystemFactory : public AbstractFilesystemFactory { +public: + typedef Common::String String; + + /** + * Creates an instance of SymbianFilesystemFactory using the Singleton pattern. + * + * @return A unique instance of SymbianFilesytemFactory. + */ + static SymbianFilesystemFactory *instance(); + + virtual AbstractFilesystemNode *makeRootFileNode() const; + virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const; + virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const; + +protected: + SymbianFilesystemFactory() {}; + +private: + static SymbianFilesystemFactory *_instance; +}; + +#endif /*SYMBIAN_FILESYSTEM_FACTORY_H*/ diff --git a/backends/fs/windows/WindowsFilesystemFactory.cpp b/backends/fs/windows/WindowsFilesystemFactory.cpp deleted file mode 100644 index a360fd1c7a..0000000000 --- a/backends/fs/windows/WindowsFilesystemFactory.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include "backends/fs/windows/WindowsFilesystemFactory.h" -#include "backends/fs/windows/windows-fs.cpp" - -WindowsFilesystemFactory *WindowsFilesystemFactory::_instance = 0; - -WindowsFilesystemFactory *WindowsFilesystemFactory::instance(){ - if(_instance == 0){ - _instance = new WindowsFilesystemFactory(); - } - return _instance; -} - -AbstractFilesystemNode *WindowsFilesystemFactory::makeRootFileNode() const { - return new WindowsFilesystemNode(); -} - -AbstractFilesystemNode *WindowsFilesystemFactory::makeCurrentDirectoryFileNode() const { - return new WindowsFilesystemNode(NULL, true); -} - -AbstractFilesystemNode *WindowsFilesystemFactory::makeFileNodePath(const String &path) const { - return new WindowsFilesystemNode(path, false); -} diff --git a/backends/fs/windows/WindowsFilesystemFactory.h b/backends/fs/windows/WindowsFilesystemFactory.h deleted file mode 100644 index 0d965089c4..0000000000 --- a/backends/fs/windows/WindowsFilesystemFactory.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef WINDOWSFILESYSTEMFACTORY_H_ -#define WINDOWSFILESYSTEMFACTORY_H_ - -#include "backends/fs/AbstractFilesystemFactory.h" - -/** - * Creates WindowsFilesystemNode objects. - * - * Parts of this class are documented in the base interface class, AbstractFilesystemFactory. - */ -class WindowsFilesystemFactory : public AbstractFilesystemFactory { -public: - typedef Common::String String; - - /** - * Creates an instance of WindowsFilesystemFactory using the Singleton pattern. - * - * @return A unique instance of WindowsFilesytemFactory. - */ - static WindowsFilesystemFactory *instance(); - - /** - * Destructor. - */ - virtual ~WindowsFilesystemFactory() {}; - - virtual AbstractFilesystemNode *makeRootFileNode() const; - virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const; - virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const; - -protected: - WindowsFilesystemFactory() {}; - -private: - static WindowsFilesystemFactory *_instance; -}; - -#endif /*WINDOWSFILESYSTEMFACTORY_H_*/ diff --git a/backends/fs/windows/windows-fs-factory.cpp b/backends/fs/windows/windows-fs-factory.cpp new file mode 100644 index 0000000000..fb77b4ca07 --- /dev/null +++ b/backends/fs/windows/windows-fs-factory.cpp @@ -0,0 +1,23 @@ +#include "backends/fs/windows/windows-fs-factory.h" +#include "backends/fs/windows/windows-fs.cpp" + +WindowsFilesystemFactory *WindowsFilesystemFactory::_instance = 0; + +WindowsFilesystemFactory *WindowsFilesystemFactory::instance(){ + if(_instance == 0){ + _instance = new WindowsFilesystemFactory(); + } + return _instance; +} + +AbstractFilesystemNode *WindowsFilesystemFactory::makeRootFileNode() const { + return new WindowsFilesystemNode(); +} + +AbstractFilesystemNode *WindowsFilesystemFactory::makeCurrentDirectoryFileNode() const { + return new WindowsFilesystemNode(NULL, true); +} + +AbstractFilesystemNode *WindowsFilesystemFactory::makeFileNodePath(const String &path) const { + return new WindowsFilesystemNode(path, false); +} diff --git a/backends/fs/windows/windows-fs-factory.h b/backends/fs/windows/windows-fs-factory.h new file mode 100644 index 0000000000..a7abf390ae --- /dev/null +++ b/backends/fs/windows/windows-fs-factory.h @@ -0,0 +1,33 @@ +#ifndef WINDOWS_FILESYSTEM_FACTORY_H +#define WINDOWS_FILESYSTEM_FACTORY_H + +#include "backends/fs/abstract-fs-factory.h" + +/** + * Creates WindowsFilesystemNode objects. + * + * Parts of this class are documented in the base interface class, AbstractFilesystemFactory. + */ +class WindowsFilesystemFactory : public AbstractFilesystemFactory { +public: + typedef Common::String String; + + /** + * Creates an instance of WindowsFilesystemFactory using the Singleton pattern. + * + * @return A unique instance of WindowsFilesytemFactory. + */ + static WindowsFilesystemFactory *instance(); + + virtual AbstractFilesystemNode *makeRootFileNode() const; + virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const; + virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const; + +protected: + WindowsFilesystemFactory() {}; + +private: + static WindowsFilesystemFactory *_instance; +}; + +#endif /*WINDOWS_FILESYSTEM_FACTORY_H*/ -- cgit v1.2.3