#include "c-file-ptr-stream.h"
Public Types | |
typedef int(* | close_fcn) (FILE *) |
typedef std::streambuf::int_type | int_type |
Public Member Functions | |
c_file_ptr_buf ()=delete | |
c_file_ptr_buf (FILE *f, close_fcn cf=file_close) | |
~c_file_ptr_buf () | |
int | buf_close () |
void | clear () |
int | file_number () const |
int | flush () |
int_type | overflow (int_type) |
int_type | pbackfail (int_type) |
int | seek (off_t offset, int origin) |
std::streampos | seekoff (std::streamoff, std::ios::seekdir, std::ios::openmode=std::ios::in|std::ios::out) |
std::streampos | seekpos (std::streampos, std::ios::openmode=std::ios::in|std::ios::out) |
FILE * | stdiofile () |
int | sync () |
off_t | tell () |
int_type | uflow () |
int_type | underflow () |
std::streamsize | xsgetn (char *, std::streamsize) |
std::streamsize | xsputn (const char *, std::streamsize) |
Static Public Member Functions | |
static int | file_close (FILE *m_f) |
Protected Attributes | |
close_fcn | m_cf |
FILE * | m_f |
Definition at line 40 of file c-file-ptr-stream.h.
typedef int(* c_file_ptr_buf::close_fcn) (FILE *) |
Definition at line 47 of file c-file-ptr-stream.h.
typedef std::streambuf::int_type c_file_ptr_buf::int_type |
Definition at line 45 of file c-file-ptr-stream.h.
|
delete |
|
inline |
Definition at line 53 of file c-file-ptr-stream.h.
c_file_ptr_buf::~c_file_ptr_buf | ( | ) |
Definition at line 50 of file c-file-ptr-stream.cc.
References buf_close().
int c_file_ptr_buf::buf_close | ( | ) |
Definition at line 159 of file c-file-ptr-stream.cc.
References flush(), m_cf, and m_f.
Referenced by ~c_file_ptr_buf().
|
inline |
Definition at line 91 of file c-file-ptr-stream.h.
|
static |
Definition at line 187 of file c-file-ptr-stream.cc.
References m_f.
|
inline |
Definition at line 85 of file c-file-ptr-stream.h.
int c_file_ptr_buf::flush | ( | ) |
Definition at line 153 of file c-file-ptr-stream.cc.
References m_f.
Referenced by buf_close(), overflow(), and sync().
c_file_ptr_buf::int_type c_file_ptr_buf::overflow | ( | int_type | c | ) |
Definition at line 58 of file c-file-ptr-stream.cc.
c_file_ptr_buf::int_type c_file_ptr_buf::pbackfail | ( | int_type | c | ) |
Definition at line 83 of file c-file-ptr-stream.cc.
References m_f.
int c_file_ptr_buf::seek | ( | off_t | offset, |
int | origin | ||
) |
Definition at line 175 of file c-file-ptr-stream.cc.
References m_f, and octave_fseeko_wrapper().
std::streampos c_file_ptr_buf::seekoff | ( | std::streamoff | offset, |
std::ios::seekdir | dir, | ||
std::ios::openmode | = std::ios::in | std::ios::out |
||
) |
Definition at line 117 of file c-file-ptr-stream.cc.
References m_f, and octave_fseeko_wrapper().
std::streampos c_file_ptr_buf::seekpos | ( | std::streampos | offset, |
std::ios::openmode | = std::ios::in | std::ios::out |
||
) |
Definition at line 132 of file c-file-ptr-stream.cc.
References m_f, octave_fseeko_wrapper(), octave_ftello_wrapper(), and SEEK_SET.
|
inline |
Definition at line 49 of file c-file-ptr-stream.h.
int c_file_ptr_buf::sync | ( | ) |
Definition at line 145 of file c-file-ptr-stream.cc.
References flush().
off_t c_file_ptr_buf::tell | ( | ) |
Definition at line 181 of file c-file-ptr-stream.cc.
References m_f, and octave_ftello_wrapper().
|
inline |
Definition at line 65 of file c-file-ptr-stream.h.
|
inline |
Definition at line 63 of file c-file-ptr-stream.h.
std::streamsize c_file_ptr_buf::xsgetn | ( | char * | s, |
std::streamsize | n | ||
) |
Definition at line 99 of file c-file-ptr-stream.cc.
std::streamsize c_file_ptr_buf::xsputn | ( | const char * | s, |
std::streamsize | n | ||
) |
Definition at line 90 of file c-file-ptr-stream.cc.
|
protected |
Definition at line 99 of file c-file-ptr-stream.h.
Referenced by buf_close().
|
protected |
Definition at line 97 of file c-file-ptr-stream.h.
Referenced by buf_close(), procbuf::close(), file_close(), flush(), procbuf::open(), overflow(), pbackfail(), seek(), seekoff(), seekpos(), tell(), xsgetn(), and xsputn().