Nebula
|
#include <archivefilesystembase.h>
Inherits Core::RefCounted.
Inherited by IO::ZipFileSystem.
Public Member Functions | |
ArchiveFileSystemBase () | |
constructor | |
virtual | ~ArchiveFileSystemBase () |
destructor | |
void | Setup () |
setup the archive file system | |
void | Discard () |
discard the archive file system | |
bool | IsValid () const |
return true if archive file system has been setup | |
virtual Ptr< Archive > | Mount (const URI &uri) |
mount an archive | |
virtual Ptr< Archive > | MountEmbedded (const URI &uri, const Util::String &rootPath) |
mount an embedded archive | |
virtual void | Unmount (const URI &uri) |
unmount an archive by URI | |
virtual void | Unmount (const Ptr< Archive > &archive) |
unmount an archive by pointer | |
bool | IsMounted (const URI &uri) const |
return true if an archive is mounted | |
bool | HasArchives () const |
Any archives mounted? | |
Util::Array< Ptr< Archive > > | GetMountedArchives () const |
get an array of all mounted archives | |
Ptr< Archive > | FindArchive (const URI &uri) const |
find a zip archive by its URI, returns invalid ptr if not mounted | |
virtual Ptr< Archive > | FindArchiveWithFile (const URI &fileUri) const |
find first archive which contains the file path | |
virtual Ptr< Archive > | FindArchiveWithDir (const URI &dirUri) const |
find first archive which contains the directory path | |
URI | ConvertFileToArchiveURIIfExists (const URI &uri) const |
transparently convert a URI pointing to a file into a matching archive URI | |
URI | ConvertDirToArchiveURIIfExists (const URI &uri) const |
transparently convert a URI pointing to a directory into a matching archive URI | |
Public Member Functions inherited from Core::RefCounted | |
RefCounted () | |
constructor | |
int | GetRefCount () const |
get the current refcount | |
void | AddRef () |
increment refcount by one | |
void | Release () |
decrement refcount and destroy object if refcount is zero | |
bool | IsInstanceOf (const Rtti &rtti) const |
return true if this object is instance of given class | |
bool | IsInstanceOf (const Util::String &className) const |
return true if this object is instance of given class by string | |
bool | IsInstanceOf (const Util::FourCC &classFourCC) const |
return true if this object is instance of given class by fourcc | |
bool | IsA (const Rtti &rtti) const |
return true if this object is instance of given class, or a derived class | |
bool | IsA (const Util::String &rttiName) const |
return true if this object is instance of given class, or a derived class, by string | |
bool | IsA (const Util::FourCC &rttiFourCC) const |
return true if this object is instance of given class, or a derived class, by fourcc | |
const Util::String & | GetClassName () const |
get the class name | |
Util::FourCC | GetClassFourCC () const |
get the class FourCC code | |
Protected Attributes | |
Threading::CriticalSection | critSect |
Util::Dictionary< Util::String, Ptr< Archive > > | archives |
bool | isValid |
Private Member Functions | |
__DeclareClass (ArchiveFileSystemBase) | |
__DeclareInterfaceSingleton (ArchiveFileSystemBase) | |
Additional Inherited Members | |
Static Public Member Functions inherited from Core::RefCounted | |
static void | DumpRefCountingLeaks () |
dump refcounting leaks, call at end of application (NEBULA_DEBUG builds only!) | |
Protected Member Functions inherited from Core::RefCounted | |
virtual | ~RefCounted () |
destructor (called when refcount reaches zero) | |
IO::ArchiveFileSystemBase::ArchiveFileSystemBase | ( | ) |
constructor
|
virtual |
destructor
|
private |
|
private |
transparently convert a URI pointing to a directory into a matching archive URI
This method is the directory version of ConvertFileToArchiveURIIfExists().
transparently convert a URI pointing to a file into a matching archive URI
This method should check if the provided URI is located in any of the mounted archives, and if yes, return a converted the URI which describes how the file in the archive is accessed.
This method must be overriden in a subclass, the base class implementation will always return the original URI!
void IO::ArchiveFileSystemBase::Discard | ( | ) |
discard the archive file system
Discard the archive file system.
find first archive which contains the directory path
This method should return the archive which contains the provided directory URI.
Override this method in a derived class!
Reimplemented in IO::ZipFileSystem.
find first archive which contains the file path
This method should return the archive which contains the provided file URI.
Override this method in a derived class!
Reimplemented in IO::ZipFileSystem.
get an array of all mounted archives
Return all currently mounted archives.
bool IO::ArchiveFileSystemBase::HasArchives | ( | ) | const |
Any archives mounted?
bool IO::ArchiveFileSystemBase::IsMounted | ( | const URI & | uri | ) | const |
return true if an archive is mounted
|
inline |
return true if archive file system has been setup
mount an archive
This "mounts" an archive file by creating a new Archive object and adding it to the archive dictionary.
If mounting fails, an invalid pointer will be returned!
|
virtual |
mount an embedded archive
This "mounts" an archive file by creating a new Archive object and adding it to the archive dictionary.
If mounting fails, an invalid pointer will be returned!
void IO::ArchiveFileSystemBase::Setup | ( | ) |
setup the archive file system
Setup the archive file system.
Subclasses may register their archive stream classes with the SchemeRegistry here.
unmount an archive by pointer
Unmount a zip archive, this will remove the archive from the internal archive registry, and call the Discard() method on it.
|
virtual |
|
protected |
|
protected |
|
protected |