#include "oct-stream.h"
Public Member Functions | |
base_stream (std::ios::openmode arg_md=std::ios::in|std::ios::out, mach_info::float_format ff=mach_info::native_float_format()) | |
base_stream (const base_stream &)=delete | |
virtual | ~base_stream (void)=default |
void | close (void) |
virtual void | do_close (void) |
virtual bool | eof (void) const =0 |
std::string | error (bool clear, int &err_num) |
virtual int | file_number (void) const |
virtual std::istream * | input_stream (void) |
bool | is_open (void) const |
virtual std::string | name (void) const =0 |
bool | ok (void) const |
base_stream & | operator= (const base_stream &)=delete |
virtual std::ostream * | output_stream (void) |
virtual int | seek (off_t offset, int origin)=0 |
virtual off_t | tell (void)=0 |
Protected Member Functions | |
void | clear (void) |
void | clearerr (void) |
void | error (const std::string &msg) |
void | error (const std::string &who, const std::string &msg) |
mach_info::float_format | float_format (void) const |
int | mode (void) const |
Private Attributes | |
refcount< octave_idx_type > | count |
std::string | errmsg |
bool | fail |
mach_info::float_format | flt_fmt |
int | md |
bool | open_state |
Friends | |
class | stream |
Definition at line 61 of file oct-stream.h.
|
inline |
Definition at line 69 of file oct-stream.h.
|
delete |
|
virtualdefault |
|
protected |
Definition at line 3968 of file oct-stream.cc.
Referenced by error(), and octave::stream::stream_ok().
|
protected |
Definition at line 3975 of file oct-stream.cc.
References input_stream(), is, os, and output_stream().
|
inline |
Definition at line 120 of file oct-stream.h.
Referenced by octave::stream::close().
|
inlinevirtual |
Reimplemented in octave_tstdiostream< BUF_T, STREAM_T, FILE_T >, octave_tstdiostream< c_zfile_ptr_buf, io_c_zfile_ptr_stream, gzFile >, octave_tstdiostream< c_file_ptr_buf, io_c_file_ptr_stream, FILE *>, and octave_fstream.
Definition at line 118 of file oct-stream.h.
|
private |
Definition at line 3991 of file oct-stream.cc.
References c, err, error(), file_number(), input_stream(), invalid_operation(), is, retval, and string.
Referenced by do_oscanf(), do_scanf(), getl(), and gets().
|
private |
Definition at line 5656 of file oct-stream.cc.
References octave::do_printf_conv(), error(), octave::printf_format_elt::flags, octave::is_nan_or_inf(), lo_ieee_is_NA, lo_ieee_isinf, octave::ok_for_signed_int_conv(), octave::ok_for_unsigned_int_conv(), os, octave::printf_format_elt::prec, retval, string, octave::switch_to_g_format(), octave::printf_format_elt::text, octave::printf_format_elt::type, type, val, and octave_int< T >::value().
Referenced by do_printf().
|
private |
Definition at line 5001 of file oct-stream.cc.
References BEGIN_C_CONVERSION, BEGIN_CHAR_CLASS_CONVERSION, BEGIN_S_CONVERSION, octave::scanf_format_elt::discard, do_gets(), DO_LITERAL_CONVERSION, DO_PCT_CONVERSION, DO_WHITESPACE_CONVERSION, err, error(), input_stream(), is, octave::scanf_format_elt::literal_conversion, octave::scanf_format_elt::modifier, name(), octave::octave_scan(), ok(), retval, string, octave::scanf_format_elt::text, tmp, octave::scanf_format_elt::type, and octave::scanf_format_elt::whitespace_conversion.
Referenced by oscanf().
|
private |
Definition at line 5775 of file oct-stream.cc.
References octave::printf_format_elt::args, do_numeric_printf_conv(), octave::do_printf_string(), error(), octave::printf_value_cache::exhausted(), octave::printf_format_list::first(), octave::printf_format_elt::fw, octave::printf_value_cache::get_next_value(), octave::printf_value_cache::int_value(), invalid_operation(), octave::printf_format_list::next(), octave::printf_format_list::num_conversions(), os, output_stream(), octave::printf_format_elt::prec, retval, string, octave::printf_format_elt::text, octave::printf_format_elt::type, and val.
Referenced by printf().
|
private |
Definition at line 4571 of file oct-stream.cc.
References octave::scanf_format_list::all_character_conversions(), BEGIN_C_CONVERSION, BEGIN_CHAR_CLASS_CONVERSION, BEGIN_S_CONVERSION, octave_value::convert_to_str(), octave::scanf_format_elt::discard, do_gets(), DO_LITERAL_CONVERSION, DO_PCT_CONVERSION, octave::do_scanf_conv(), DO_WHITESPACE_CONVERSION, err, error(), file_number(), FINISH_CHARACTER_CONVERSION, octave::scanf_format_list::first(), Array< T >::fortran_vec(), input_stream(), is, octave::scanf_format_list::length(), octave::scanf_format_elt::literal_conversion, octave::scanf_format_elt::modifier, name(), octave::scanf_format_list::next(), octave::scanf_format_elt::null, octave::scanf_format_list::num_conversions(), ok(), panic_impossible, Matrix::resize(), retval, string, octave::scanf_format_elt::text, tmp, octave::scanf_format_elt::type, and octave::scanf_format_elt::whitespace_conversion.
Referenced by scanf().
|
private |
Definition at line 5289 of file oct-stream.cc.
References error(), file_number(), input_stream(), invalid_operation(), options, retval, and octave::textscan::scan().
Referenced by octave::stream::textscan().
|
pure virtual |
Implemented in octave_ostrstream, octave_ostream, octave_istrstream, octave_istream, octave_fstream, octave_base_iostream, octave_tstdiostream< BUF_T, STREAM_T, FILE_T >, octave_tstdiostream< c_zfile_ptr_buf, io_c_zfile_ptr_stream, gzFile >, and octave_tstdiostream< c_file_ptr_buf, io_c_file_ptr_stream, FILE *>.
Referenced by octave::stream::eof().
std::string octave::base_stream::error | ( | bool | clear, |
int & | err_num | ||
) |
Definition at line 5939 of file oct-stream.cc.
References clear(), errmsg, fail, string, and tmp.
Referenced by do_gets(), do_numeric_printf_conv(), do_oscanf(), do_printf(), do_scanf(), do_textscan(), octave::stream::error(), octave_base_iostream::invalid_operation(), invalid_operation(), octave_fstream::octave_fstream(), oscanf(), printf(), puts(), scanf(), octave_base_strstream::seek(), octave_fstream::seek(), skipl(), octave_fstream::tell(), and octave_base_strstream::tell().
|
protected |
Definition at line 3954 of file oct-stream.cc.
|
protected |
Definition at line 3961 of file oct-stream.cc.
|
inlinevirtual |
Reimplemented in octave_tstdiostream< BUF_T, STREAM_T, FILE_T >, octave_tstdiostream< c_zfile_ptr_buf, io_c_zfile_ptr_stream, gzFile >, and octave_tstdiostream< c_file_ptr_buf, io_c_file_ptr_stream, FILE *>.
Definition at line 129 of file oct-stream.h.
References name.
Referenced by do_gets(), do_scanf(), do_textscan(), and skipl().
|
inlineprotected |
Definition at line 153 of file oct-stream.h.
References flt_fmt.
Referenced by octave::stream::float_format().
|
private |
Definition at line 5319 of file oct-stream.cc.
References octave::stream::flush(), invalid_operation(), os, output_stream(), and retval.
Referenced by octave::stream::flush().
|
private |
Definition at line 4089 of file oct-stream.cc.
References do_gets(), and err.
Referenced by octave::stream::getl().
|
private |
Definition at line 4096 of file oct-stream.cc.
References do_gets(), and err.
Referenced by octave::stream::gets().
|
inlinevirtual |
Reimplemented in octave_ostrstream, octave_ostream, octave_istrstream, octave_istream, octave_fstream, octave_tstdiostream< BUF_T, STREAM_T, FILE_T >, octave_tstdiostream< c_zfile_ptr_buf, io_c_zfile_ptr_stream, gzFile >, and octave_tstdiostream< c_file_ptr_buf, io_c_file_ptr_stream, FILE *>.
Definition at line 106 of file oct-stream.h.
Referenced by clearerr(), do_gets(), do_oscanf(), do_scanf(), do_textscan(), oscanf(), scanf(), and skipl().
|
private |
Definition at line 5952 of file oct-stream.cc.
References error(), and string.
Referenced by do_gets(), do_printf(), do_textscan(), flush(), octave::stream::invalid_operation(), oscanf(), puts(), scanf(), and skipl().
|
inline |
Definition at line 116 of file oct-stream.h.
Referenced by octave::stream::is_open().
|
inlineprotected |
Definition at line 151 of file oct-stream.h.
Referenced by octave_fstream::input_stream(), octave::stream::mode(), and octave_fstream::output_stream().
|
pure virtual |
Implemented in octave_fstream, octave_base_iostream, octave_tstdiostream< BUF_T, STREAM_T, FILE_T >, octave_tstdiostream< c_zfile_ptr_buf, io_c_zfile_ptr_stream, gzFile >, octave_tstdiostream< c_file_ptr_buf, io_c_file_ptr_stream, FILE *>, and octave_base_strstream.
Referenced by do_oscanf(), do_scanf(), and octave::stream::name().
|
inline |
Definition at line 143 of file oct-stream.h.
Referenced by do_oscanf(), do_scanf(), and oscanf().
|
delete |
|
private |
Definition at line 5215 of file oct-stream.cc.
References do_oscanf(), error(), octave::scanf_format_list::first(), i, input_stream(), invalid_operation(), is, octave::scanf_format_list::length(), octave::scanf_format_list::next(), octave::scanf_format_list::num_conversions(), ok(), octave_value::resize(), retval, and tmp.
Referenced by octave::stream::oscanf().
|
inlinevirtual |
Reimplemented in octave_ostrstream, octave_ostream, octave_istrstream, octave_istream, octave_fstream, octave_tstdiostream< BUF_T, STREAM_T, FILE_T >, octave_tstdiostream< c_zfile_ptr_buf, io_c_zfile_ptr_stream, gzFile >, and octave_tstdiostream< c_file_ptr_buf, io_c_file_ptr_stream, FILE *>.
Definition at line 112 of file oct-stream.h.
Referenced by clearerr(), do_printf(), flush(), and puts().
|
private |
Definition at line 5887 of file oct-stream.cc.
References do_printf(), error(), and octave::printf_format_list::num_conversions().
Referenced by octave::stream::printf().
|
private |
Definition at line 5900 of file oct-stream.cc.
References error(), octave::stream::flush(), invalid_operation(), os, output_stream(), retval, and s.
Referenced by octave::stream::puts().
|
private |
Definition at line 4967 of file oct-stream.cc.
References do_scanf(), error(), octave::get_size(), input_stream(), invalid_operation(), octave::scanf_format_list::num_conversions(), and retval.
Referenced by octave::stream::scanf().
|
pure virtual |
Implemented in octave_fstream, octave_base_iostream, octave_base_strstream, octave_tstdiostream< BUF_T, STREAM_T, FILE_T >, octave_tstdiostream< c_zfile_ptr_buf, io_c_zfile_ptr_stream, gzFile >, and octave_tstdiostream< c_file_ptr_buf, io_c_file_ptr_stream, FILE *>.
Referenced by octave::stream::seek().
|
private |
Definition at line 4103 of file oct-stream.cc.
References c, err, error(), file_number(), input_stream(), invalid_operation(), and is.
Referenced by octave::stream::skipl().
|
pure virtual |
Implemented in octave_istrstream, octave_fstream, octave_base_iostream, octave_base_strstream, octave_tstdiostream< BUF_T, STREAM_T, FILE_T >, octave_tstdiostream< c_zfile_ptr_buf, io_c_zfile_ptr_stream, gzFile >, and octave_tstdiostream< c_file_ptr_buf, io_c_file_ptr_stream, FILE *>.
Referenced by octave::stream::seek(), and octave::stream::tell().
|
friend |
Definition at line 65 of file oct-stream.h.
|
private |
Definition at line 171 of file oct-stream.h.
Referenced by octave::stream::operator=(), octave::stream::stream(), and octave::stream::~stream().
|
private |
Definition at line 187 of file oct-stream.h.
|
private |
Definition at line 181 of file oct-stream.h.
|
private |
Definition at line 178 of file oct-stream.h.
Referenced by octave_istrstream::create(), and octave_ostrstream::create().
|
private |
Definition at line 175 of file oct-stream.h.
|
private |
Definition at line 184 of file oct-stream.h.