aboutsummaryrefslogtreecommitdiff
path: root/backends/factories/gp32
diff options
context:
space:
mode:
Diffstat (limited to 'backends/factories/gp32')
-rw-r--r--backends/factories/gp32/gp32-fs-factory.cpp21
-rw-r--r--backends/factories/gp32/gp32-fs-factory.h28
2 files changed, 49 insertions, 0 deletions
diff --git a/backends/factories/gp32/gp32-fs-factory.cpp b/backends/factories/gp32/gp32-fs-factory.cpp
new file mode 100644
index 0000000000..bffbffa21d
--- /dev/null
+++ b/backends/factories/gp32/gp32-fs-factory.cpp
@@ -0,0 +1,21 @@
+#include "backends/factories/gp32/gp32-fs-factory.h"
+#include "backends/fs/gp32/gp32-fs.cpp"
+#include "backends/file/base-file.h"
+
+DECLARE_SINGLETON(GP32FilesystemFactory);
+
+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);
+}
+
+BaseFile *GP32FilesystemFactory::makeBaseFile() const {
+ return new BaseFile();
+}
diff --git a/backends/factories/gp32/gp32-fs-factory.h b/backends/factories/gp32/gp32-fs-factory.h
new file mode 100644
index 0000000000..b5e5df3b6b
--- /dev/null
+++ b/backends/factories/gp32/gp32-fs-factory.h
@@ -0,0 +1,28 @@
+#ifndef GP32_FILESYSTEM_FACTORY_H
+#define GP32_FILESYSTEM_FACTORY_H
+
+#include "common/singleton.h"
+#include "backends/factories/abstract-fs-factory.h"
+
+/**
+ * Creates GP32FilesystemNode objects.
+ *
+ * Parts of this class are documented in the base interface class, AbstractFilesystemFactory.
+ */
+class GP32FilesystemFactory : public AbstractFilesystemFactory, public Common::Singleton<GP32FilesystemFactory> {
+public:
+ typedef Common::String String;
+
+ virtual AbstractFilesystemNode *makeRootFileNode() const;
+ virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
+ virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const;
+ virtual BaseFile *makeBaseFile() const;
+
+protected:
+ GP32FilesystemFactory() {};
+
+private:
+ friend class Common::Singleton<SingletonBaseType>;
+};
+
+#endif /*GP32_FILESYSTEM_FACTORY_H*/