Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
A VirtualFile used to read a file contained in a .zip archive. More...
#include <ZippedFile.hpp>
Public Member Functions | |
| virtual const char * | className () |
| Returns the name of the class. | |
| ZippedFile () | |
| ~ZippedFile () | |
| ZippedFileInfo * | zippedFileInfo () const |
| void | setZippedFileInfo (ZippedFileInfo *info) |
| virtual bool | exists () const |
| This returns true if zippedFileInfo() has been properly set up but does not check the existence of this file in the source zip file. | |
| virtual bool | open (EOpenMode mode) |
| Opens the file in the specified mode. | |
| virtual bool | isOpen () const |
Returns true if the file has been opened. | |
| virtual void | close () |
| Closes the file. | |
| virtual long long | size () const |
| Returns the size of the file in bytes. | |
| bool | extract (char *destination, bool check_sum=true) |
| ZippedFile & | operator= (const ZippedFile &other) |
| virtual ref< VirtualFile > | clone () const |
| Creates a clone of this class instance. | |
| void | resetStream () |
Protected Member Functions | |
| virtual long long | read_Implementation (void *buffer, long long bytes_to_read) |
| virtual long long | write_Implementation (const void *, long long) |
| virtual bool | fillUncompressedBuffer () |
| virtual long long | position_Implementation () const |
| virtual bool | seekSet_Implementation (long long) |
Protected Attributes | |
| ref< ZippedFileInfo > | mZippedFileInfo |
| long long | mReadBytes |
| z_stream_s * | mZStream |
| unsigned char | mZipBufferIn [CHUNK_SIZE] |
| unsigned char | mZipBufferOut [CHUNK_SIZE] |
| std::vector< char > | mUncompressedBuffer |
| int | mUncompressedBufferPtr |
A VirtualFile used to read a file contained in a .zip archive.
| ZippedFile::ZippedFile | ( | ) |
| ZippedFile::~ZippedFile | ( | ) |
| virtual const char* vl::ZippedFile::className | ( | ) | [inline, virtual] |
Returns the name of the class.
Reimplemented from vl::VirtualFile.
| ZippedFileInfo * ZippedFile::zippedFileInfo | ( | ) | const |
| void ZippedFile::setZippedFileInfo | ( | ZippedFileInfo * | info ) |
| bool ZippedFile::exists | ( | ) | const [virtual] |
This returns true if zippedFileInfo() has been properly set up but does not check the existence of this file in the source zip file.
To do so call ZippedDirectory::exists().
Implements vl::VirtualFile.
| bool ZippedFile::open | ( | EOpenMode | mode ) | [virtual] |
Opens the file in the specified mode.
Implements vl::VirtualFile.
| bool ZippedFile::isOpen | ( | ) | const [virtual] |
Returns true if the file has been opened.
Implements vl::VirtualFile.
| void ZippedFile::close | ( | ) | [virtual] |
Closes the file.
Implements vl::VirtualFile.
| long long ZippedFile::size | ( | ) | const [virtual] |
Returns the size of the file in bytes.
Implements vl::VirtualFile.
| bool ZippedFile::extract | ( | char * | destination, |
| bool | check_sum = true |
||
| ) |
| ZippedFile& vl::ZippedFile::operator= | ( | const ZippedFile & | other ) | [inline] |
| ref< VirtualFile > ZippedFile::clone | ( | ) | const [virtual] |
Creates a clone of this class instance.
Implements vl::VirtualFile.
| void ZippedFile::resetStream | ( | ) |
| long long ZippedFile::read_Implementation | ( | void * | buffer, |
| long long | bytes_to_read | ||
| ) | [protected, virtual] |
Implements vl::VirtualFile.
| virtual long long vl::ZippedFile::write_Implementation | ( | const void * | , |
| long long | |||
| ) | [inline, protected, virtual] |
Implements vl::VirtualFile.
| bool ZippedFile::fillUncompressedBuffer | ( | ) | [protected, virtual] |
| virtual long long vl::ZippedFile::position_Implementation | ( | ) | const [inline, protected, virtual] |
Implements vl::VirtualFile.
| bool ZippedFile::seekSet_Implementation | ( | long long | pos ) | [protected, virtual] |
Implements vl::VirtualFile.
ref<ZippedFileInfo> vl::ZippedFile::mZippedFileInfo [protected] |
long long vl::ZippedFile::mReadBytes [protected] |
z_stream_s* vl::ZippedFile::mZStream [protected] |
unsigned char vl::ZippedFile::mZipBufferIn[CHUNK_SIZE] [protected] |
unsigned char vl::ZippedFile::mZipBufferOut[CHUNK_SIZE] [protected] |
std::vector<char> vl::ZippedFile::mUncompressedBuffer [protected] |
int vl::ZippedFile::mUncompressedBufferPtr [protected] |