Scippy

UG

Ubiquity Generator framework

gzstreambuf Class Reference

Internal class to implement gzstream. More...

#include <gzstream.h>

Inheritance diagram for gzstreambuf:

Public Member Functions

Construction / destruction
 gzstreambuf ()
 default constructor More...
 
 ~gzstreambuf ()
 destructor More...
 
Interface
int is_open ()
 
gzstreambufopen (const char *name, int open_mode)
 
gzstreambufclose ()
 
virtual int overflow (int c=EOF)
 
virtual int underflow ()
 
virtual int sync ()
 

Private Member Functions

Internal helpers
int flush_buffer ()
 

Private Attributes

Data
gzFile file
 file handle for compressed file More...
 
char buffer [bufferSize]
 data buffer More...
 
char opened
 open/close state of stream More...
 
int mode
 I/O mode. More...
 

Static Private Attributes

Types
static const int bufferSize = 47+256
 size of data buff More...
 

Detailed Description

Internal class to implement gzstream.

Definition at line 59 of file gzstream.h.

Constructor & Destructor Documentation

◆ gzstreambuf()

default constructor

Definition at line 94 of file gzstream.h.

References gzstreambuf::buffer, and gzstreambuf::bufferSize.

◆ ~gzstreambuf()

destructor

Definition at line 104 of file gzstream.h.

References gzstreambuf::close().

Member Function Documentation

◆ close()

◆ flush_buffer()

int flush_buffer ( )
private

Definition at line 105 of file gzstream.cpp.

References gzstreambuf::file.

Referenced by gzstreambuf::overflow(), and gzstreambuf::sync().

◆ is_open()

int is_open ( )

Definition at line 114 of file gzstream.h.

References gzstreambuf::opened.

Referenced by gzstreambuf::close(), gzstreambase::close(), and gzstreambuf::open().

◆ open()

gzstreambuf * open ( const char *  name,
int  open_mode 
)

◆ overflow()

int overflow ( int  c = EOF)
virtual

Definition at line 115 of file gzstream.cpp.

References gzstreambuf::flush_buffer(), gzstreambuf::mode, and gzstreambuf::opened.

◆ sync()

int sync ( )
virtual

Definition at line 127 of file gzstream.cpp.

References gzstreambuf::flush_buffer().

Referenced by gzstreambuf::close().

◆ underflow()

int underflow ( )
virtual

Member Data Documentation

◆ buffer

char buffer[bufferSize]
private

data buffer

Definition at line 76 of file gzstream.h.

Referenced by gzstreambuf::gzstreambuf(), and gzstreambuf::underflow().

◆ bufferSize

const int bufferSize = 47+256
staticprivate

size of data buff

Definition at line 68 of file gzstream.h.

Referenced by gzstreambuf::gzstreambuf(), and gzstreambuf::underflow().

◆ file

gzFile file
private

file handle for compressed file

Definition at line 75 of file gzstream.h.

Referenced by gzstreambuf::close(), gzstreambuf::flush_buffer(), gzstreambuf::open(), and gzstreambuf::underflow().

◆ mode

int mode
private

I/O mode.

Definition at line 78 of file gzstream.h.

Referenced by gzstreambuf::open(), gzstreambuf::overflow(), and gzstreambuf::underflow().

◆ opened

char opened
private

open/close state of stream

Definition at line 77 of file gzstream.h.

Referenced by gzstreambuf::close(), gzstreambuf::is_open(), gzstreambuf::open(), gzstreambuf::overflow(), and gzstreambuf::underflow().