xoreos
0.0.5
|
A class encapsulating ZIP files for resource archive access. More...
#include <zipfile.h>
Public Member Functions | |
ZIPFile (Common::SeekableReadStream *zip) | |
Take over this stream and read a ZIP file out of it. More... | |
~ZIPFile () | |
const ResourceList & | getResources () const |
Return the list of resources. More... | |
uint32 | getResourceSize (uint32 index) const |
Return the size of a resource. More... | |
Common::SeekableReadStream * | getResource (uint32 index, bool tryNoCopy=false) const |
Return a stream of the resource's contents. More... | |
Public Member Functions inherited from Aurora::Archive | |
Archive () | |
virtual | ~Archive () |
virtual Common::HashAlgo | getNameHashAlgo () const |
Return with which algorithm the name is hashed. More... | |
uint32 | findResource (uint64 hash) const |
Return the index of the resource matching the hash, or 0xFFFFFFFF if not found. More... | |
uint32 | findResource (const Common::UString &name, FileType type) const |
Return the index of the resource matching the name and type, or 0xFFFFFFFF if not found. More... | |
Private Member Functions | |
void | load () |
Private Attributes | |
Common::ScopedPtr< Common::ZipFile > | _zipFile |
The actual zip file. More... | |
ResourceList | _resources |
External list of resource names and types. More... | |
Additional Inherited Members | |
Public Types inherited from Aurora::Archive | |
typedef std::list< Resource > | ResourceList |
A class encapsulating ZIP files for resource archive access.
Aurora::ZIPFile::ZIPFile | ( | Common::SeekableReadStream * | zip | ) |
Take over this stream and read a ZIP file out of it.
Definition at line 33 of file zipfile.cpp.
References _zipFile, load(), and Common::ScopedPtrBase< T, Deallocator >::reset().
Aurora::ZIPFile::~ZIPFile | ( | ) |
Definition at line 41 of file zipfile.cpp.
|
virtual |
Return a stream of the resource's contents.
Implements Aurora::Archive.
Definition at line 52 of file zipfile.cpp.
References _zipFile.
|
virtual |
Return the list of resources.
Implements Aurora::Archive.
Definition at line 44 of file zipfile.cpp.
References _resources.
Return the size of a resource.
Reimplemented from Aurora::Archive.
Definition at line 48 of file zipfile.cpp.
References _zipFile.
|
private |
Definition at line 56 of file zipfile.cpp.
References _resources, _zipFile, Common::FilePath::getStem(), Aurora::Archive::Resource::index, Aurora::Archive::Resource::name, Aurora::Archive::Resource::type, and TypeMan.
Referenced by ZIPFile().
|
private |
External list of resource names and types.
Definition at line 62 of file zipfile.h.
Referenced by getResources(), and load().
|
private |
The actual zip file.
Definition at line 59 of file zipfile.h.
Referenced by getResource(), getResourceSize(), load(), and ZIPFile().