GNU Octave
4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include "oct-stream.h"
Public Member Functions | |
octave_base_stream (std::ios::openmode arg_md=std::ios::in|std::ios::out, octave::mach_info::float_format ff=octave::mach_info::native_float_format()) | |
virtual | ~octave_base_stream (void) |
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 |
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) |
octave::mach_info::float_format | float_format (void) const |
int | mode (void) const |
Private Attributes | |
octave_refcount< octave_idx_type > | count |
std::string | errmsg |
bool | fail |
octave::mach_info::float_format | flt_fmt |
int | md |
bool | open_state |
Friends | |
class | octave_stream |
Definition at line 57 of file oct-stream.h.
|
inline |
Definition at line 65 of file oct-stream.h.
|
inlinevirtual |
Definition at line 72 of file oct-stream.h.
|
private |
|
protected |
Definition at line 3982 of file oct-stream.cc.
Referenced by error(), and octave_stream::stream_ok().
|
protected |
Definition at line 3989 of file oct-stream.cc.
References input_stream(), and output_stream().
Referenced by octave_stream::clearerr().
|
inline |
Definition at line 111 of file oct-stream.h.
References octave_stream::is_open().
Referenced by octave_stream::close().
|
inlinevirtual |
Reimplemented in octave_tstdiostream< BUF_T, STREAM_T, FILE_T >, octave_tstdiostream< c_file_ptr_buf, io_c_file_ptr_stream, FILE * >, octave_tstdiostream< c_zfile_ptr_buf, io_c_zfile_ptr_stream, gzFile >, and octave_fstream.
Definition at line 109 of file oct-stream.h.
|
private |
Definition at line 4005 of file oct-stream.cc.
References c, error(), file_number(), input_stream(), invalid_operation(), retval, and string.
Referenced by do_oscanf(), do_scanf(), getl(), and gets().
|
private |
Definition at line 5600 of file oct-stream.cc.
References do_printf_conv(), octave_value::double_value(), error(), printf_format_elt::flags, octave_value::int64_scalar_value(), is_nan_or_inf(), lo_ieee_is_NA, lo_ieee_isinf, ok_for_signed_int_conv(), ok_for_unsigned_int_conv(), printf_format_elt::prec, retval, string, switch_to_g_format(), printf_format_elt::text, printf_format_elt::type, type, octave_value::uint64_scalar_value(), and octave_int< T >::value().
Referenced by do_printf().
|
private |
Definition at line 5013 of file oct-stream.cc.
References BEGIN_C_CONVERSION, BEGIN_CHAR_CLASS_CONVERSION, BEGIN_S_CONVERSION, scanf_format_elt::discard, do_gets(), DO_LITERAL_CONVERSION, DO_PCT_CONVERSION, DO_WHITESPACE_CONVERSION, err, error(), input_stream(), scanf_format_elt::literal_conversion, name(), octave_scan(), ok(), scanf_format_elt::text, tmp, scanf_format_elt::type, and scanf_format_elt::whitespace_conversion.
Referenced by oscanf().
|
private |
Definition at line 5721 of file oct-stream.cc.
References printf_format_elt::args, do_numeric_printf_conv(), do_printf_string(), error(), printf_value_cache::exhausted(), printf_format_list::first(), printf_format_elt::fw, printf_value_cache::get_next_value(), printf_value_cache::int_value(), invalid_operation(), octave_value::is_string(), printf_format_list::next(), printf_format_list::num_conversions(), output_stream(), printf_format_elt::prec, retval, string, octave_value::string_value(), strlen(), printf_format_elt::text, printf_format_elt::type, and val.
Referenced by printf().
|
private |
Definition at line 4583 of file oct-stream.cc.
References scanf_format_list::all_character_conversions(), BEGIN_C_CONVERSION, BEGIN_CHAR_CLASS_CONVERSION, BEGIN_S_CONVERSION, scanf_format_elt::discard, do_gets(), DO_LITERAL_CONVERSION, DO_PCT_CONVERSION, do_scanf_conv(), DO_WHITESPACE_CONVERSION, err, error(), file_number(), FINISH_CHARACTER_CONVERSION, scanf_format_list::first(), Array< T >::fortran_vec(), input_stream(), scanf_format_list::length(), scanf_format_elt::literal_conversion, scanf_format_elt::modifier, name(), scanf_format_list::next(), scanf_format_elt::null, scanf_format_list::num_conversions(), ok(), panic_impossible, Matrix::resize(), retval, scanf_format_elt::text, tmp, scanf_format_elt::type, and scanf_format_elt::whitespace_conversion.
Referenced by scanf().
|
private |
Definition at line 5237 of file oct-stream.cc.
References error(), file_number(), input_stream(), invalid_operation(), retval, octave::textscan::scan(), and scanner.
Referenced by octave_stream::textscan().
|
pure virtual |
Implemented in octave_ostrstream, octave_ostream, octave_istrstream, octave_istream, octave_fstream, octave_tstdiostream< BUF_T, STREAM_T, FILE_T >, octave_tstdiostream< c_file_ptr_buf, io_c_file_ptr_stream, FILE * >, octave_tstdiostream< c_zfile_ptr_buf, io_c_zfile_ptr_stream, gzFile >, and octave_base_iostream.
Referenced by octave_stream::eof().
std::string octave_base_stream::error | ( | bool | clear, |
int & | err_num | ||
) |
Definition at line 5882 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_base_strstream::tell(), and octave_fstream::tell().
|
protected |
Definition at line 3968 of file oct-stream.cc.
|
protected |
Definition at line 3975 of file oct-stream.cc.
|
inlinevirtual |
Reimplemented in octave_tstdiostream< BUF_T, STREAM_T, FILE_T >, octave_tstdiostream< c_file_ptr_buf, io_c_file_ptr_stream, FILE * >, and octave_tstdiostream< c_zfile_ptr_buf, io_c_zfile_ptr_stream, gzFile >.
Definition at line 120 of file oct-stream.h.
References name.
Referenced by do_gets(), do_scanf(), do_textscan(), octave_stream::file_number(), and skipl().
|
inlineprotected |
Definition at line 144 of file oct-stream.h.
References flt_fmt.
Referenced by octave_stream::float_format().
|
private |
Definition at line 5267 of file oct-stream.cc.
References invalid_operation(), output_stream(), and retval.
Referenced by octave_stream::flush().
|
private |
Definition at line 4103 of file oct-stream.cc.
References do_gets().
Referenced by octave_stream::getl().
|
private |
Definition at line 4110 of file oct-stream.cc.
References do_gets().
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_file_ptr_buf, io_c_file_ptr_stream, FILE * >, and octave_tstdiostream< c_zfile_ptr_buf, io_c_zfile_ptr_stream, gzFile >.
Definition at line 97 of file oct-stream.h.
Referenced by clearerr(), do_gets(), do_oscanf(), do_scanf(), do_textscan(), octave_stream::input_stream(), oscanf(), scanf(), and skipl().
|
private |
Definition at line 5895 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 107 of file oct-stream.h.
Referenced by octave_stream::is_open().
|
inlineprotected |
Definition at line 142 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_tstdiostream< BUF_T, STREAM_T, FILE_T >, octave_tstdiostream< c_file_ptr_buf, io_c_file_ptr_stream, FILE * >, octave_tstdiostream< c_zfile_ptr_buf, io_c_zfile_ptr_stream, gzFile >, octave_base_iostream, and octave_base_strstream.
Referenced by do_oscanf(), do_scanf(), and octave_stream::name().
|
inline |
Definition at line 134 of file oct-stream.h.
Referenced by do_oscanf(), do_scanf(), octave_stream::ok(), and oscanf().
|
private |
|
private |
Definition at line 5163 of file oct-stream.cc.
References do_oscanf(), error(), scanf_format_list::first(), input_stream(), invalid_operation(), octave_value::is_defined(), scanf_format_list::length(), scanf_format_list::next(), scanf_format_list::num_conversions(), ok(), octave_value_list::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_file_ptr_buf, io_c_file_ptr_stream, FILE * >, and octave_tstdiostream< c_zfile_ptr_buf, io_c_zfile_ptr_stream, gzFile >.
Definition at line 103 of file oct-stream.h.
Referenced by clearerr(), do_printf(), flush(), octave_stream::output_stream(), and puts().
|
private |
Definition at line 5830 of file oct-stream.cc.
References do_printf(), error(), and printf_format_list::num_conversions().
Referenced by octave_stream::printf().
|
private |
Definition at line 5843 of file oct-stream.cc.
References error(), invalid_operation(), output_stream(), retval, and s.
Referenced by octave_stream::puts().
|
private |
Definition at line 4979 of file oct-stream.cc.
References do_scanf(), error(), get_size(), input_stream(), invalid_operation(), scanf_format_list::num_conversions(), and retval.
Referenced by octave_stream::scanf().
Implemented in octave_fstream, octave_tstdiostream< BUF_T, STREAM_T, FILE_T >, octave_tstdiostream< c_file_ptr_buf, io_c_file_ptr_stream, FILE * >, octave_tstdiostream< c_zfile_ptr_buf, io_c_zfile_ptr_stream, gzFile >, octave_base_iostream, and octave_base_strstream.
Referenced by octave_stream::seek().
|
private |
Definition at line 4117 of file oct-stream.cc.
References c, error(), file_number(), input_stream(), and invalid_operation().
Referenced by octave_stream::skipl().
|
pure virtual |
Implemented in octave_istrstream, octave_fstream, octave_tstdiostream< BUF_T, STREAM_T, FILE_T >, octave_tstdiostream< c_file_ptr_buf, io_c_file_ptr_stream, FILE * >, octave_tstdiostream< c_zfile_ptr_buf, io_c_zfile_ptr_stream, gzFile >, octave_base_iostream, and octave_base_strstream.
Referenced by octave_stream::seek(), and octave_stream::tell().
|
friend |
Definition at line 61 of file oct-stream.h.
Referenced by octave_fstream::create(), octave_iprocstream::create(), octave_oprocstream::create(), octave_istream::create(), octave_istrstream::create(), octave_ostream::create(), and octave_ostrstream::create().
|
private |
Definition at line 162 of file oct-stream.h.
Referenced by octave_stream::octave_stream(), octave_stream::operator=(), and octave_stream::~octave_stream().
|
private |
Definition at line 178 of file oct-stream.h.
|
private |
Definition at line 172 of file oct-stream.h.
|
private |
Definition at line 169 of file oct-stream.h.
|
private |
Definition at line 166 of file oct-stream.h.
|
private |
Definition at line 175 of file oct-stream.h.