#include <chminputstream.h>
Inheritance diagram for CHMInputStream:
Public Member Functions | |
CHMInputStream (const wxString &archive, const wxString &file) | |
Creates a stream. | |
virtual size_t | GetSize () const |
Returns the size of the file. | |
virtual bool | Eof () const |
True if EOF has been found. | |
Static Public Member Functions | |
static CHMFile * | GetCache () |
Returns the static CHMFile pointer associated with this stream. Archives are being cached until it is explicitly requested to open a different one. | |
static void | Cleanup () |
Cleans up the cache. Has to be public and static since the stream doesn't know how many other streams using the same cache will be created after it. Somebody else has to turn off the lights, and in this case it's CHMFSHandler. | |
Protected Member Functions | |
virtual size_t | OnSysRead (void *buffer, size_t bufsize) |
Attempts to read a chunk from the stream. | |
virtual off_t | OnSysSeek (off_t seek, wxSeekMode mode) |
Seeks to the requested position in the file. | |
virtual off_t | OnSysTell () const |
Asks what is the current position in the file. | |
Private Member Functions | |
bool | Init (const wxString &archive) |
Helper. Inits the cache. | |
Private Attributes | |
off_t | _currPos |
chmUnitInfo | _ui |
Static Private Attributes | |
static CHMFile * | _archiveCache = NULL |
static wxString | _path |
|
Creates a stream.
|
|
Returns the static CHMFile pointer associated with this stream. Archives are being cached until it is explicitly requested to open a different one.
|
|
Attempts to read a chunk from the stream.
|
|
Seeks to the requested position in the file.
|
|
Asks what is the current position in the file.
|