Adonthell  0.4
gz_file Class Reference

Base class for igzstream and ogzstream. More...

#include <fileops.h>

Inheritance diagram for gz_file:

Public Member Functions

 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...
 

Protected Attributes

gzFile file
 The actual gzFile. More...
 

Detailed Description

Base class for igzstream and ogzstream.

Definition at line 56 of file fileops.h.

Constructor & Destructor Documentation

§ gz_file() [1/2]

gz_file::gz_file ( )

Default constructor.

Definition at line 38 of file fileops.cc.

§ gz_file() [2/2]

gz_file::gz_file ( const string &  fname,
gz_type  t 
)
Parameters
fnamename of the file to open.
taccess (READ or WRITE).

Definition at line 43 of file fileops.cc.

§ ~gz_file()

gz_file::~gz_file ( )
virtual

Destructor.

Definition at line 49 of file fileops.cc.

Member Function Documentation

§ open()

bool gz_file::open ( const string &  fname,
gz_type  t 
)

Opens a file.

Parameters
fnamename of the file to open.
taccess (READ or WRITE).
Returns
true if succeed, false otherwise.

Definition at line 54 of file fileops.cc.

§ close()

void gz_file::close ( )

Close the file that was opened.

Definition at line 63 of file fileops.cc.

§ is_open()

bool gz_file::is_open ( )
inline

Returns whether the file is opened or not.

Returns
true if the file is opened, false otherwise.

Definition at line 103 of file fileops.h.

§ eof()

bool gz_file::eof ( )
inline

Returns whether the file is at it's end or not.

Returns
true if the end of file is reached, else otherwise.

Definition at line 111 of file fileops.h.

Member Data Documentation

§ file

gzFile gz_file::file
protected

The actual gzFile.

Definition at line 121 of file fileops.h.


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