Logo Search packages:      
Sourcecode: xchm version File versions

CHMInputStream Class Reference

#include <chminputstream.h>

Inheritance diagram for CHMInputStream:


List of all members.

Detailed Description

Input stream from a .chm archive.

Definition at line 36 of file chminputstream.h.

Public Member Functions

 CHMInputStream (const wxString &archive, const wxString &file)
 Creates a stream.
virtual bool Eof () const
 True if EOF has been found.
virtual size_t GetSize () const
 Returns the size of the file.

Static Public Member Functions

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.
static CHMFileGetCache ()
 Returns the static CHMFile pointer associated with this stream. Archives are being cached until it is explicitly requested to open a different one.

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

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index