#include <chmxx.h>
Public Member Functions | |
chmistream (const chmfile &chm, const std::string &path, size_t buf_size=1024) | |
Create a new input stream from archive for given path. | |
std::streamsize | read_left () const |
Returns the number of bytes that are left to be read from this stream. | |
virtual | ~chmistream () |
size_t | get_encint () |
Get little endian MS encint from the stream. | |
unsigned long | get_dword () |
Get local endianized MS dword (2 x 2 bytes) from the stream. | |
unsigned int | get_word () |
Get local endianized MS word (2 bytes) from the stream. | |
unsigned long | get_sr (int, int r, int &pos) |
Get a s-r encoded value from the stream. | |
void | get_sr_finish (int &pos) |
chm::chmfile chm("/chmfile.chm"); chm::chmistream in(chm, "/path"); string line; while ( readline(chm, line) ) { cout << line; }
Definition at line 148 of file chmxx.h.
chm::chmistream::chmistream | ( | const chmfile & | chm, | |
const std::string & | path, | |||
size_t | buf_size = 1024 | |||
) |
Create a new input stream from archive for given path.
virtual chm::chmistream::~chmistream | ( | ) | [virtual] |
std::streamsize chm::chmistream::read_left | ( | ) | const |
Returns the number of bytes that are left to be read from this stream.
So returns the size of file when nothing has been read.
size_t chm::chmistream::get_encint | ( | ) | [inline] |
unsigned long chm::chmistream::get_dword | ( | ) | [inline] |
unsigned int chm::chmistream::get_word | ( | ) | [inline] |
unsigned long chm::chmistream::get_sr | ( | int | , | |
int | r, | |||
int & | pos | |||
) | [inline] |