#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 (const c_file_ptr_buf &)=delete | |
c_file_ptr_buf (FILE *f_arg, close_fcn cf_arg=file_close) | |
~c_file_ptr_buf (void) | |
int | buf_close (void) |
void | clear (void) |
int | file_number () const |
int | flush (void) |
c_file_ptr_buf & | operator= (const c_file_ptr_buf &)=delete |
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 (void) |
int | sync (void) |
off_t | tell (void) |
int_type | uflow (void) |
int_type | underflow (void) |
std::streamsize | xsgetn (char *, std::streamsize) |
std::streamsize | xsputn (const char *, std::streamsize) |
Static Public Member Functions | |
static int | file_close (FILE *f) |
Protected Attributes | |
close_fcn | cf |
FILE * | f |
Private Member Functions | |
int_type | underflow_common (bool) |
Definition at line 34 of file c-file-ptr-stream.h.
typedef int(* c_file_ptr_buf::close_fcn) (FILE *) |
Definition at line 41 of file c-file-ptr-stream.h.
typedef std::streambuf::int_type c_file_ptr_buf::int_type |
Definition at line 39 of file c-file-ptr-stream.h.
|
inline |
Definition at line 45 of file c-file-ptr-stream.h.
|
delete |
c_file_ptr_buf::~c_file_ptr_buf | ( | void | ) |
Definition at line 48 of file c-file-ptr-stream.cc.
References buf_close().
int c_file_ptr_buf::buf_close | ( | void | ) |
Definition at line 157 of file c-file-ptr-stream.cc.
References cf, f, flush(), and retval.
Referenced by ~c_file_ptr_buf().
|
inline |
Definition at line 87 of file c-file-ptr-stream.h.
References f.
|
static |
Definition at line 185 of file c-file-ptr-stream.cc.
References f.
|
inline |
Definition at line 81 of file c-file-ptr-stream.h.
References f.
int c_file_ptr_buf::flush | ( | void | ) |
Definition at line 151 of file c-file-ptr-stream.cc.
References f.
Referenced by buf_close(), overflow(), and sync().
|
delete |
c_file_ptr_buf::int_type c_file_ptr_buf::overflow | ( | int_type | c | ) |
Definition at line 56 of file c-file-ptr-stream.cc.
c_file_ptr_buf::int_type c_file_ptr_buf::pbackfail | ( | int_type | c | ) |
Definition at line 81 of file c-file-ptr-stream.cc.
References f.
int c_file_ptr_buf::seek | ( | off_t | offset, |
int | origin | ||
) |
Definition at line 173 of file c-file-ptr-stream.cc.
References 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 115 of file c-file-ptr-stream.cc.
References f, octave_fseeko_wrapper(), octave_ftello_wrapper(), and seekdir_to_whence().
std::streampos c_file_ptr_buf::seekpos | ( | std::streampos | offset, |
std::ios::openmode | = std::ios::in | std::ios::out |
||
) |
Definition at line 130 of file c-file-ptr-stream.cc.
References f, octave_fseeko_wrapper(), octave_ftello_wrapper(), and SEEK_SET.
|
inline |
Definition at line 43 of file c-file-ptr-stream.h.
References f.
int c_file_ptr_buf::sync | ( | void | ) |
Definition at line 143 of file c-file-ptr-stream.cc.
References flush().
off_t c_file_ptr_buf::tell | ( | void | ) |
Definition at line 179 of file c-file-ptr-stream.cc.
References f, and octave_ftello_wrapper().
|
inline |
Definition at line 61 of file c-file-ptr-stream.h.
|
inline |
Definition at line 59 of file c-file-ptr-stream.h.
|
private |
Definition at line 65 of file c-file-ptr-stream.cc.
References f.
std::streamsize c_file_ptr_buf::xsgetn | ( | char * | s, |
std::streamsize | n | ||
) |
Definition at line 97 of file c-file-ptr-stream.cc.
std::streamsize c_file_ptr_buf::xsputn | ( | const char * | s, |
std::streamsize | n | ||
) |
Definition at line 88 of file c-file-ptr-stream.cc.
|
protected |
Definition at line 95 of file c-file-ptr-stream.h.
Referenced by buf_close().
|
protected |
Definition at line 93 of file c-file-ptr-stream.h.
Referenced by buf_close(), octave_procbuf::close(), file_close(), flush(), octave_procbuf::open(), overflow(), pbackfail(), seek(), seekoff(), seekpos(), tell(), underflow_common(), xsgetn(), and xsputn().