Use abstract factories to initialize FilesystemNode objects.
svn-id: r26739
This commit is contained in:
parent
8f5abc1924
commit
c459f054b4
39 changed files with 1912 additions and 953 deletions
23
backends/fs/ps2/Ps2FilesystemFactory.cpp
Normal file
23
backends/fs/ps2/Ps2FilesystemFactory.cpp
Normal file
|
@ -0,0 +1,23 @@
|
|||
#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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue