Adonthell  0.4
ogzstream Class Reference

Class to write data from a Gzip compressed file. More...

#include <fileops.h>

Inheritance diagram for ogzstream:
Collaboration diagram for ogzstream:

Public Member Functions

 ogzstream ()
 Default constructor. More...
 
 ogzstream (const string &fname)
 Opens a file for write access. More...
 
 ~ogzstream ()
 Destructor. More...
 
bool open (const string &fname)
 Opens a file for write access. More...
 
void put_block (void *to, u_int32 size)
 Writes a block of bytes to the file. More...
 
void put_bool (const bool &n)
 
void put_uint8 (const u_int8 &n)
 
void put_sint8 (const s_int8 &n)
 
void put_uint16 (const u_int16 &n)
 
void put_sint16 (const s_int16 &n)
 
void put_uint32 (const u_int32 &n)
 
void put_sint32 (const s_int32 &n)
 
void put_string (const string &s)
 
void put_float (const float &n)
 
- Public Member Functions inherited from gz_file
 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

const bool & operator>> (const bool &n, ogzstream &gfile)
 Writes a boolean. More...
 
const char & operator>> (const char &n, ogzstream &gfile)
 Writes a char. More...
 
const u_int8operator>> (const u_int8 &n, ogzstream &gfile)
 Writes a u_int8. More...
 
const s_int8operator>> (const s_int8 &n, ogzstream &gfile)
 Writes a s_int8. More...
 
const u_int16operator>> (const u_int16 &n, ogzstream &gfile)
 Writes a u_int16. More...
 
const s_int16operator>> (const s_int16 &n, ogzstream &gfile)
 Writes a s_int16. More...
 
const u_int32operator>> (const u_int32 &n, ogzstream &gfile)
 Writes a u_int32. More...
 
const s_int32operator>> (const s_int32 &n, ogzstream &gfile)
 Writes a s_int32. More...
 
string & operator>> (const string &s, ogzstream &gfile)
 Writes a string. More...
 
const float & operator>> (const float &s, ogzstream &gfile)
 Writes a float. More...
 

Additional Inherited Members

- Protected Attributes inherited from gz_file
gzFile file
 The actual gzFile. More...
 

Detailed Description

Class to write data from a Gzip compressed file.

Definition at line 227 of file fileops.h.

Constructor & Destructor Documentation

ogzstream::ogzstream ( )

Default constructor.

Definition at line 254 of file fileops.cc.

ogzstream::ogzstream ( const string &  fname)

Opens a file for write access.

Parameters
fnamename of the file to open.

Definition at line 258 of file fileops.cc.

ogzstream::~ogzstream ( )

Destructor.

Definition at line 262 of file fileops.cc.

Member Function Documentation

bool ogzstream::open ( const string &  fname)

Opens a file for write access.

Parameters
fnamename of the file to open.
Returns
true if succeed, false otherwise.

Definition at line 266 of file fileops.cc.

void ogzstream::put_block ( void *  to,
u_int32  size 
)

Writes a block of bytes to the file.

Parameters
topointer to the buffer to write.
sizenumber of bytes to write.

Definition at line 271 of file fileops.cc.

Friends And Related Function Documentation

const bool& operator>> ( const bool &  n,
ogzstream gfile 
)
friend

Writes a boolean.

Definition at line 277 of file fileops.cc.

const char& operator>> ( const char &  n,
ogzstream gfile 
)
friend

Writes a char.

Definition at line 285 of file fileops.cc.

const u_int8& operator>> ( const u_int8 n,
ogzstream gfile 
)
friend

Writes a u_int8.

Definition at line 292 of file fileops.cc.

const s_int8& operator>> ( const s_int8 n,
ogzstream gfile 
)
friend

Writes a s_int8.

Definition at line 299 of file fileops.cc.

const u_int16& operator>> ( const u_int16 n,
ogzstream gfile 
)
friend

Writes a u_int16.

Definition at line 306 of file fileops.cc.

const s_int16& operator>> ( const s_int16 n,
ogzstream gfile 
)
friend

Writes a s_int16.

Definition at line 314 of file fileops.cc.

const u_int32& operator>> ( const u_int32 n,
ogzstream gfile 
)
friend

Writes a u_int32.

Definition at line 322 of file fileops.cc.

const s_int32& operator>> ( const s_int32 n,
ogzstream gfile 
)
friend

Writes a s_int32.

Definition at line 330 of file fileops.cc.

string& operator>> ( const string &  s,
ogzstream gfile 
)
friend

Writes a string.

Definition at line 338 of file fileops.cc.

const float& operator>> ( const float &  s,
ogzstream gfile 
)
friend

Writes a float.

Definition at line 350 of file fileops.cc.


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