FS: Allow multiple instances of the same archive type to be open at once

This commit is contained in:
Yuri Kunde Schlesner
2015-02-06 11:53:14 -02:00
parent 4468625080
commit 3f1a3952d7
19 changed files with 199 additions and 159 deletions

View File

@ -15,22 +15,17 @@
namespace FileSys {
/// File system interface to the SaveData archive
class Archive_SaveData final : public DiskArchive {
class ArchiveFactory_SaveData final : public ArchiveFactory {
public:
Archive_SaveData(const std::string& mount_point);
ArchiveFactory_SaveData(const std::string& mount_point);
std::string GetName() const override { return "SaveData"; }
ResultCode Open(const Path& path) override;
ResultVal<std::unique_ptr<ArchiveBackend>> Open(const Path& path) override;
ResultCode Format(const Path& path) override;
ResultCode Format(const Path& path) const override;
const std::string& GetMountPoint() const override {
return concrete_mount_point;
}
protected:
std::string concrete_mount_point;
private:
std::string mount_point;
};
} // namespace FileSys