![]() |
GNU Octave
3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
Gzipped file output stream class. More...
#include "zfstream.h"


Public Member Functions | |
| gzofstream () | |
| gzofstream (const char *name, std::ios_base::openmode mode=std::ios_base::out) | |
| Construct stream on gzipped file to be opened. | |
| gzofstream (int fd, std::ios_base::openmode mode=std::ios_base::out) | |
| Construct stream on already open gzipped file. | |
| void | attach (int fd, std::ios_base::openmode mode=std::ios_base::out) |
| Attach to already open gzipped file. | |
| void | close () |
| Close gzipped file. | |
| bool | is_open () |
| Check if file is open. | |
| void | open (const char *name, std::ios_base::openmode mode=std::ios_base::out) |
| Open gzipped file. | |
| gzfilebuf * | rdbuf () const |
| Obtain underlying stream buffer. | |
Private Attributes | |
| gzfilebuf | sb |
| Underlying stream buffer. | |
Gzipped file output stream class.
This class implements ofstream for gzipped files. Seeking and putback is not supported yet.
Definition at line 370 of file zfstream.h.
| gzofstream::gzofstream | ( | ) |
Definition at line 572 of file zfstream.cc.
References sb.
|
explicit |
Construct stream on gzipped file to be opened.
| name | File name. |
| mode | Open mode flags (forced to contain ios::out). |
Definition at line 577 of file zfstream.cc.
|
explicit |
Construct stream on already open gzipped file.
| fd | File descriptor. |
| mode | Open mode flags (forced to contain ios::out). |
Definition at line 585 of file zfstream.cc.
Attach to already open gzipped file.
| fd | File descriptor. |
| mode | Open mode flags (forced to contain ios::out). |
Stream will be in state good() if attach succeeded; otherwise in state fail().
Definition at line 604 of file zfstream.cc.
References gzfilebuf::attach(), clear(), and sb.
Referenced by gzofstream().
Close gzipped file.
Stream will be in state fail() if close failed.
Definition at line 614 of file zfstream.cc.
References gzfilebuf::close(), and sb.
Referenced by dump_octave_core().
Check if file is open.
Definition at line 406 of file zfstream.h.
References gzfilebuf::is_open(), and sb.
Open gzipped file.
| name | File name. |
| mode | Open mode flags (forced to contain ios::out). |
Stream will be in state good() if file opens successfully; otherwise in state fail(). This differs from the behavior of ofstream, which never sets the state to good() and therefore won't allow you to reuse the stream for a second file unless you manually clear() the state. The choice is a matter of convenience.
Definition at line 594 of file zfstream.cc.
References clear(), gzfilebuf::open(), and sb.
Referenced by gzofstream().
Obtain underlying stream buffer.
Definition at line 398 of file zfstream.h.
References sb.
Referenced by setcompression().
|
private |
Underlying stream buffer.
Definition at line 448 of file zfstream.h.
Referenced by attach(), close(), gzofstream(), is_open(), open(), and rdbuf().
1.8.1.2