Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

CTBzfile Class Reference

Interface to C I/O files and gz compressed files **. More...

#include "CTBzfile.hxx"

List of all members.

Public Methods

 CTBzfile ()
 ~CTBzfile ()
bool Open (const char *c_name, const char *c_mode)
void Close ()
CTBint Read (void *p_buf, CTBint i_size)
CTBint Write (const void *p_buf, CTBint i_size)
CTBint ReadObject (void *p_buf, CTBint i_size)
CTBint WriteObject (const void *p_buf, CTBint i_size)
bool Good ()
bool Bad ()
bool Fail ()
bool Eof ()
void Dump (int i_indent=0, ostream &os=cout, const char *p_text=0) const

Private Types

enum  type { closed = 0, cfile, gzfile }

Private Attributes

int mi_type
void * m_file
bool mb_bad
bool mb_eof


Detailed Description

Interface to C I/O files and gz compressed files **.

Todo:
review state logic - is it consistent with C++ streams ??

Definition at line 16 of file CTBzfile.hxx.


Member Enumeration Documentation

enum CTBzfile::type [private]
 

Enumeration values:
closed   file is closed.
cfile   `normal' C I/O file.
gzfile   gz compressed file (zib).

Definition at line 43 of file CTBzfile.hxx.


Constructor & Destructor Documentation

CTBzfile::CTBzfile
 

Default constructor.

Definition at line 33 of file CTBzfile.cxx.

CTBzfile::~CTBzfile
 

Destructor.

Definition at line 45 of file CTBzfile.cxx.


Member Function Documentation

bool CTBzfile::Open const char * c_name,
const char * c_mode
 

Open file.

Definition at line 55 of file CTBzfile.cxx.

void CTBzfile::Close
 

Close file.

Definition at line 80 of file CTBzfile.cxx.

Referenced by Open(), and ~CTBzfile().

CTBint CTBzfile::Read void * p_buf,
CTBint i_size
 

Read at most i_size bytes from file into buffer p_buf .

Definition at line 103 of file CTBzfile.cxx.

CTBint CTBzfile::Write const void * p_buf,
CTBint i_size
 

Write object of size i_size to file from buffer p_buf .

Definition at line 130 of file CTBzfile.cxx.

CTBint CTBzfile::ReadObject void * p_buf,
CTBint i_size
 

Read object of size i_size from file into buffer p_buf .

Definition at line 157 of file CTBzfile.cxx.

CTBint CTBzfile::WriteObject const void * p_buf,
CTBint i_size
 

Write object of size i_size to file from buffer p_buf .

Definition at line 186 of file CTBzfile.cxx.

bool CTBzfile::Good
 

State check: good flag.

Definition at line 215 of file CTBzfile.cxx.

bool CTBzfile::Bad
 

State check: bad flag.

Definition at line 225 of file CTBzfile.cxx.

Referenced by Fail().

bool CTBzfile::Fail
 

State check: fail flag.

Definition at line 240 of file CTBzfile.cxx.

Referenced by Good().

bool CTBzfile::Eof
 

State check: eof flag.

Definition at line 250 of file CTBzfile.cxx.

Referenced by Fail().

void CTBzfile::Dump int i_indent = 0,
ostream & os = cout,
const char * p_text = 0
const
 

Dump.

Definition at line 265 of file CTBzfile.cxx.


Member Data Documentation

int CTBzfile::mi_type [private]
 

type of file.

Definition at line 48 of file CTBzfile.hxx.

void* CTBzfile::m_file [private]
 

file handle.

Definition at line 49 of file CTBzfile.hxx.

bool CTBzfile::mb_bad [private]
 

stream in bad state.

Definition at line 50 of file CTBzfile.hxx.

bool CTBzfile::mb_eof [private]
 

stream in eof state.

Definition at line 51 of file CTBzfile.hxx.


The documentation for this class was generated from the following files:
Generated at Fri Oct 24 18:14:16 2003 for CTBbase by doxygen1.2.9-20010812 written by Dimitri van Heesch, © 1997-2001