mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-10-20 13:29:30 +00:00
Update ttvfs to new version
This commit is contained in:
parent
209ad526c6
commit
8026cdd905
43 changed files with 2124 additions and 2427 deletions
|
@ -6,27 +6,34 @@
|
|||
|
||||
#include <cstddef>
|
||||
#include "VFSDefines.h"
|
||||
#include "VFSRefcounted.h"
|
||||
|
||||
VFS_NAMESPACE_START
|
||||
|
||||
class VFSFile;
|
||||
class VFSDir;
|
||||
class File;
|
||||
class Dir;
|
||||
|
||||
// VFSLoader - to be called if a file is not in the tree.
|
||||
class VFSLoader
|
||||
class VFSLoader : public Refcounted
|
||||
{
|
||||
public:
|
||||
VFSLoader();
|
||||
virtual ~VFSLoader() {}
|
||||
virtual VFSFile *Load(const char *fn, const char *unmangled) = 0;
|
||||
virtual VFSDir *LoadDir(const char *fn, const char *unmangled) { return NULL; }
|
||||
virtual File *Load(const char *fn, const char *unmangled) = 0;
|
||||
virtual Dir *LoadDir(const char *fn, const char *unmangled) { return NULL; }
|
||||
|
||||
inline Dir *getRoot() const { return root; }
|
||||
protected:
|
||||
Dir *root;
|
||||
};
|
||||
|
||||
class VFSLoaderDisk : public VFSLoader
|
||||
class DiskLoader : public VFSLoader
|
||||
{
|
||||
public:
|
||||
virtual ~VFSLoaderDisk() {}
|
||||
virtual VFSFile *Load(const char *fn, const char *unmangled);
|
||||
virtual VFSDir *LoadDir(const char *fn, const char *unmangled);
|
||||
DiskLoader();
|
||||
virtual ~DiskLoader() {}
|
||||
virtual File *Load(const char *fn, const char *unmangled);
|
||||
virtual Dir *LoadDir(const char *fn, const char *unmangled);
|
||||
};
|
||||
|
||||
VFS_NAMESPACE_END
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue