Adonthell
0.4
|
Class to read data from a Gzip compressed file. More...
#include <fileops.h>
Public Member Functions | |
igzstream () | |
Default constructor. More... | |
igzstream (const string &fname) | |
Opens a file for read access. More... | |
~igzstream () | |
Destructor. More... | |
bool | open (const string &fname) |
Opens a file for read access. More... | |
void | get_block (void *to, u_int32 size) |
Reads a block of bytes from the file. More... | |
bool | get_bool () |
Reads a boolean. More... | |
u_int8 | get_uint8 () |
Reads a u_int8. More... | |
s_int8 | get_sint8 () |
Reads a s_int8. More... | |
u_int16 | get_uint16 () |
Reads a u_int16. More... | |
s_int16 | get_sint16 () |
Reads a s_int16. More... | |
u_int32 | get_uint32 () |
Reads a u_int32. More... | |
s_int32 | get_sint32 () |
Reads a s_int32. More... | |
string | get_string () |
Reads a string. More... | |
float | get_float () |
Reads a float. More... | |
![]() | |
gz_file () | |
Default constructor. More... | |
gz_file (const string &fname, gz_type t) | |
virtual | ~gz_file () |
Destructor. More... | |
bool | open (const string &fname, gz_type t) |
Opens a file. More... | |
void | close () |
Close the file that was opened. More... | |
bool | is_open () |
Returns whether the file is opened or not. More... | |
bool | eof () |
Returns whether the file is at it's end or not. More... | |
Friends | |
bool & | operator<< (bool &n, igzstream &gfile) |
Reads a boolean. More... | |
char & | operator<< (char &n, igzstream &gfile) |
Reads a char. More... | |
u_int8 & | operator<< (u_int8 &n, igzstream &gfile) |
Reads a u_int8. More... | |
s_int8 & | operator<< (s_int8 &n, igzstream &gfile) |
Reads a s_int8. More... | |
u_int16 & | operator<< (u_int16 &n, igzstream &gfile) |
Reads a u_int16. More... | |
s_int16 & | operator<< (s_int16 &n, igzstream &gfile) |
Reads a s_int16. More... | |
u_int32 & | operator<< (u_int32 &n, igzstream &gfile) |
Reads a u_int32. More... | |
s_int32 & | operator<< (s_int32 &n, igzstream &gfile) |
Reads a s_int32. More... | |
string & | operator<< (string &s, igzstream &gfile) |
Reads a string. More... | |
float & | operator<< (float &s, igzstream &gfile) |
Reads a float. More... | |
Additional Inherited Members | |
![]() | |
gzFile | file |
The actual gzFile. More... | |
igzstream::igzstream | ( | ) |
Default constructor.
Definition at line 65 of file fileops.cc.
igzstream::igzstream | ( | const string & | fname | ) |
Opens a file for read access.
fname | name of the file to open. |
Definition at line 69 of file fileops.cc.
igzstream::~igzstream | ( | ) |
Destructor.
Definition at line 73 of file fileops.cc.
bool igzstream::open | ( | const string & | fname | ) |
Opens a file for read access.
fname | name of the file to open. |
Definition at line 77 of file fileops.cc.
void igzstream::get_block | ( | void * | to, |
u_int32 | size | ||
) |
Reads a block of bytes from the file.
Read a block of size chars.
to | pointer to the buffer where to read. |
size | number of bytes to read. |
Definition at line 106 of file fileops.cc.
bool igzstream::get_bool | ( | ) |
Reads a boolean.
Definition at line 91 of file fileops.cc.
u_int8 igzstream::get_uint8 | ( | ) |
Reads a u_int8.
Definition at line 119 of file fileops.cc.
s_int8 igzstream::get_sint8 | ( | ) |
Reads a s_int8.
Definition at line 134 of file fileops.cc.
u_int16 igzstream::get_uint16 | ( | ) |
Reads a u_int16.
Definition at line 150 of file fileops.cc.
s_int16 igzstream::get_sint16 | ( | ) |
Reads a s_int16.
Definition at line 166 of file fileops.cc.
u_int32 igzstream::get_uint32 | ( | ) |
Reads a u_int32.
Definition at line 182 of file fileops.cc.
s_int32 igzstream::get_sint32 | ( | ) |
Reads a s_int32.
Definition at line 198 of file fileops.cc.
string igzstream::get_string | ( | ) |
Reads a string.
Definition at line 222 of file fileops.cc.
float igzstream::get_float | ( | ) |
Reads a float.
Definition at line 242 of file fileops.cc.
|
friend |
Reads a boolean.
Definition at line 83 of file fileops.cc.
|
friend |
Reads a char.
Definition at line 99 of file fileops.cc.
Reads a u_int8.
Definition at line 112 of file fileops.cc.
Reads a s_int8.
Definition at line 127 of file fileops.cc.
Reads a u_int16.
Definition at line 142 of file fileops.cc.
Reads a s_int16.
Definition at line 158 of file fileops.cc.
Reads a u_int32.
Definition at line 174 of file fileops.cc.
Reads a s_int32.
Definition at line 190 of file fileops.cc.
|
friend |
Reads a string.
Definition at line 206 of file fileops.cc.
|
friend |
Reads a float.
Definition at line 230 of file fileops.cc.