#include "oct-strstrm.h"
Public Member Functions | |
base_strstream (const base_strstream &)=delete | |
base_strstream (std::ios::openmode m=std::ios::out, mach_info::float_format ff=mach_info::native_float_format(), const std::string &encoding="utf-8") | |
virtual bool | bad (void) const =0 |
virtual void | clear (void)=0 |
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 |
std::string | name (void) const |
bool | ok (void) const |
base_strstream & | operator= (const base_strstream &)=delete |
virtual std::ostream * | output_stream (void) |
std::ostream * | preferred_output_stream (void) |
virtual std::streambuf * | rdbuf (void)=0 |
int | seek (off_t, int) |
virtual off_t | tell (void) |
Protected Member Functions | |
~base_strstream (void)=default | |
OCTINTERP_API void | clearerr (void) |
std::string | encoding (void) const |
OCTINTERP_API void | error (const std::string &msg) |
OCTINTERP_API void | error (const std::string &who, const std::string &msg) |
mach_info::float_format | float_format (void) const |
int | mode (void) const |
Private Types | |
typedef string::deletable_facet< string::codecvt_u8 > | convfacet_u8 |
Private Member Functions | |
OCTINTERP_API std::string | do_gets (octave_idx_type max_len, bool &err, bool strip_newline, const std::string &who) |
OCTINTERP_API int | do_numeric_printf_conv (std::ostream &os, const printf_format_elt *elt, int nsa, int sa_1, int sa_2, const octave_value &val, const std::string &who) |
OCTINTERP_API bool | do_oscanf (const scanf_format_elt *elt, octave_value &, const std::string &who) |
OCTINTERP_API int | do_printf (printf_format_list &fmt_list, const octave_value_list &args, const std::string &who) |
OCTINTERP_API octave_value | do_scanf (scanf_format_list &fmt_list, octave_idx_type nr, octave_idx_type nc, bool one_elt_size_spec, octave_idx_type &count, const std::string &who) |
OCTINTERP_API octave_value | do_textscan (const std::string &fmt, octave_idx_type ntimes, const octave_value_list &options, const std::string &who, octave_idx_type &count) |
OCTINTERP_API void | field_width_error (const std::string &who) const |
OCTINTERP_API int | flush (void) |
OCTINTERP_API std::string | getl (octave_idx_type max_len, bool &err, const std::string &who) |
OCTINTERP_API std::string | gets (octave_idx_type max_len, bool &err, const std::string &who) |
OCTINTERP_API void | invalid_operation (const std::string &who, const char *rw) |
OCTINTERP_API octave_value_list | oscanf (const std::string &fmt, const std::string &who) |
OCTINTERP_API int | printf (const std::string &fmt, const octave_value_list &args, const std::string &who) |
OCTINTERP_API int | puts (const std::string &s, const std::string &who) |
OCTINTERP_API octave_value | scanf (const std::string &fmt, const Array< double > &size, octave_idx_type &count, const std::string &who) |
OCTINTERP_API off_t | skipl (off_t count, bool &err, const std::string &who) |
Private Attributes | |
std::ostream * | m_conv_ostream |
std::string | m_encoding |
std::string | m_errmsg |
bool | m_fail |
mach_info::float_format | m_flt_fmt |
int | m_mode |
bool | m_open_state |
Definition at line 38 of file oct-strstrm.h.
|
privateinherited |
Definition at line 215 of file oct-stream.h.
|
inline |
Definition at line 43 of file oct-strstrm.h.
|
delete |
|
protecteddefault |
|
pure virtual |
Implemented in ostrstream, and istrstream.
|
pure virtual |
Implemented in ostrstream, and istrstream.
|
protectedinherited |
Definition at line 4094 of file oct-stream.cc.
References base_stream::input_stream(), and base_stream::preferred_output_stream().
|
inlineinherited |
Definition at line 152 of file oct-stream.h.
References stream::is_open().
|
inlinevirtualinherited |
Reimplemented in tstdiostream< BUF_T, STREAM_T, FILE_T >, tstdiostream< c_file_ptr_buf, io_c_file_ptr_stream, FILE * >, tstdiostream< c_zfile_ptr_buf, io_c_zfile_ptr_stream, gzFile >, and fstream.
Definition at line 150 of file oct-stream.h.
|
privateinherited |
Definition at line 4110 of file oct-stream.cc.
References __get_interpreter__(), base_stream::encoding(), base_stream::error(), base_stream::file_number(), base_stream::input_stream(), interpreter::interactive(), base_stream::invalid_operation(), u8_from_encoding(), and textscan_format_list::who.
Referenced by base_stream::do_oscanf(), base_stream::do_scanf(), base_stream::getl(), and base_stream::gets().
|
privateinherited |
Definition at line 5816 of file oct-stream.cc.
References do_printf_conv(), octave_value::double_value(), base_stream::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, switch_to_g_format(), printf_format_elt::text, printf_format_elt::type, octave_value::uint64_scalar_value(), octave_int< T >::value(), and textscan_format_list::who.
Referenced by base_stream::do_printf().
|
privateinherited |
Definition at line 5151 of file oct-stream.cc.
References __get_interpreter__(), BEGIN_C_CONVERSION, BEGIN_CHAR_CLASS_CONVERSION, BEGIN_S_CONVERSION, scanf_format_elt::discard, base_stream::do_gets(), DO_LITERAL_CONVERSION, DO_PCT_CONVERSION, DO_WHITESPACE_CONVERSION, base_stream::error(), application::forced_interactive(), base_stream::input_stream(), interpreter::interactive(), scanf_format_elt::literal_conversion, scanf_format_elt::modifier, base_stream::name(), octave_scan(), base_stream::ok(), scanf_format_elt::text, scanf_format_elt::type, scanf_format_elt::whitespace_conversion, and textscan_format_list::who.
Referenced by base_stream::oscanf().
|
privateinherited |
Definition at line 5943 of file oct-stream.cc.
References printf_format_elt::args, base_stream::do_numeric_printf_conv(), do_printf_string(), base_stream::error(), printf_value_cache::exhausted(), base_stream::field_width_error(), printf_format_list::first(), printf_format_elt::fw, printf_value_cache::get_next_value(), printf_value_cache::int_value(), base_stream::invalid_operation(), octave_value::is_string(), octave_value::isempty(), textscan_format_list::m_nconv, printf_format_list::next(), printf_format_list::num_conversions(), printf_format_elt::prec, base_stream::preferred_output_stream(), octave_value::string_value(), printf_format_elt::text, printf_format_elt::type, and textscan_format_list::who.
Referenced by base_stream::printf().
|
privateinherited |
Definition at line 4719 of file oct-stream.cc.
References __get_interpreter__(), scanf_format_list::all_character_conversions(), BEGIN_C_CONVERSION, BEGIN_CHAR_CLASS_CONVERSION, BEGIN_S_CONVERSION, octave_value::convert_to_str(), scanf_format_elt::discard, base_stream::do_gets(), DO_LITERAL_CONVERSION, DO_PCT_CONVERSION, do_scanf_conv(), DO_WHITESPACE_CONVERSION, base_stream::error(), base_stream::file_number(), FINISH_CHARACTER_CONVERSION, scanf_format_list::first(), application::forced_interactive(), Array< T, Alloc >::fortran_vec(), base_stream::input_stream(), interpreter::interactive(), scanf_format_list::length(), scanf_format_elt::literal_conversion, textscan_format_list::m_nconv, Matrix, scanf_format_elt::modifier, base_stream::name(), scanf_format_list::next(), scanf_format_elt::null, scanf_format_list::num_conversions(), base_stream::ok(), panic_impossible, Matrix::resize(), scanf_format_elt::text, scanf_format_elt::type, scanf_format_elt::whitespace_conversion, and textscan_format_list::who.
Referenced by base_stream::scanf().
|
privateinherited |
Definition at line 5441 of file oct-stream.cc.
References __get_interpreter__(), base_stream::encoding(), base_stream::error(), base_stream::file_number(), base_stream::input_stream(), interpreter::interactive(), base_stream::invalid_operation(), scanner, and textscan_format_list::who.
|
inlineprotectedinherited |
Definition at line 187 of file oct-stream.h.
Referenced by istrstream::create(), ostrstream::create(), base_stream::do_gets(), and base_stream::do_textscan().
|
pure virtualinherited |
|
inherited |
Definition at line 6115 of file oct-stream.cc.
References base_stream::clear(), base_stream::m_errmsg, and base_stream::m_fail.
Referenced by fstream::fstream(), base_stream::do_gets(), base_stream::do_numeric_printf_conv(), base_stream::do_oscanf(), base_stream::do_printf(), base_stream::do_scanf(), base_stream::do_textscan(), base_stream::field_width_error(), base_stream::invalid_operation(), base_iostream::invalid_operation(), base_stream::oscanf(), base_stream::printf(), base_stream::puts(), base_stream::scanf(), fstream::seek(), seek(), base_stream::skipl(), fstream::tell(), and tell().
|
protectedinherited |
Definition at line 4073 of file oct-stream.cc.
References base_stream::m_errmsg, and base_stream::m_fail.
|
protectedinherited |
Definition at line 4080 of file oct-stream.cc.
References base_stream::m_errmsg, base_stream::m_fail, and textscan_format_list::who.
|
privateinherited |
Definition at line 5936 of file oct-stream.cc.
References base_stream::error(), and textscan_format_list::who.
Referenced by base_stream::do_printf().
|
inlinevirtualinherited |
Reimplemented in tstdiostream< BUF_T, STREAM_T, FILE_T >, tstdiostream< c_file_ptr_buf, io_c_file_ptr_stream, FILE * >, and tstdiostream< c_zfile_ptr_buf, io_c_zfile_ptr_stream, gzFile >.
Definition at line 161 of file oct-stream.h.
References stream::name().
Referenced by base_stream::do_gets(), base_stream::do_scanf(), base_stream::do_textscan(), and base_stream::skipl().
|
inlineprotectedinherited |
Definition at line 185 of file oct-stream.h.
|
privateinherited |
Definition at line 5473 of file oct-stream.cc.
References base_stream::invalid_operation(), and base_stream::preferred_output_stream().
|
privateinherited |
Definition at line 4214 of file oct-stream.cc.
References base_stream::do_gets(), and textscan_format_list::who.
|
privateinherited |
Definition at line 4221 of file oct-stream.cc.
References base_stream::do_gets(), and textscan_format_list::who.
|
inlinevirtualinherited |
Reimplemented in ostrstream, istrstream, tstdiostream< BUF_T, STREAM_T, FILE_T >, tstdiostream< c_file_ptr_buf, io_c_file_ptr_stream, FILE * >, tstdiostream< c_zfile_ptr_buf, io_c_zfile_ptr_stream, gzFile >, ostream, istream, and fstream.
Definition at line 113 of file oct-stream.h.
Referenced by base_stream::clearerr(), base_stream::do_gets(), base_stream::do_oscanf(), base_stream::do_scanf(), base_stream::do_textscan(), base_stream::oscanf(), base_stream::scanf(), and base_stream::skipl().
|
privateinherited |
Definition at line 6128 of file oct-stream.cc.
References base_stream::error(), and textscan_format_list::who.
Referenced by base_stream::do_gets(), base_stream::do_printf(), base_stream::do_textscan(), base_stream::flush(), base_stream::oscanf(), base_stream::puts(), base_stream::scanf(), and base_stream::skipl().
|
inlineinherited |
Definition at line 148 of file oct-stream.h.
|
inlineprotectedinherited |
Definition at line 183 of file oct-stream.h.
Referenced by fstream::input_stream(), and fstream::output_stream().
|
inlinevirtual |
Implements base_stream.
Definition at line 71 of file oct-strstrm.h.
|
inlineinherited |
Definition at line 175 of file oct-stream.h.
Referenced by base_stream::do_oscanf(), base_stream::do_scanf(), and base_stream::oscanf().
|
delete |
|
privateinherited |
Definition at line 5367 of file oct-stream.cc.
References base_stream::do_oscanf(), base_stream::error(), scanf_format_list::first(), base_stream::input_stream(), base_stream::invalid_operation(), octave_value::is_defined(), len, scanf_format_list::length(), textscan_format_list::m_nconv, scanf_format_list::next(), scanf_format_list::num_conversions(), base_stream::ok(), octave_value_list::resize(), and textscan_format_list::who.
|
inlinevirtualinherited |
Reimplemented in ostrstream, istrstream, tstdiostream< BUF_T, STREAM_T, FILE_T >, tstdiostream< c_file_ptr_buf, io_c_file_ptr_stream, FILE * >, tstdiostream< c_zfile_ptr_buf, io_c_zfile_ptr_stream, gzFile >, ostream, istream, and fstream.
Definition at line 119 of file oct-stream.h.
|
inlineinherited |
Definition at line 124 of file oct-stream.h.
References stream::output_stream().
Referenced by base_stream::clearerr(), base_stream::do_printf(), base_stream::flush(), and base_stream::puts().
|
privateinherited |
Definition at line 6063 of file oct-stream.cc.
References base_stream::do_printf(), base_stream::error(), printf_format_list::num_conversions(), and textscan_format_list::who.
|
privateinherited |
Definition at line 6076 of file oct-stream.cc.
References base_stream::error(), base_stream::invalid_operation(), base_stream::preferred_output_stream(), and textscan_format_list::who.
|
pure virtual |
Implemented in ostrstream, and istrstream.
|
privateinherited |
Definition at line 5117 of file oct-stream.cc.
References base_stream::do_scanf(), base_stream::error(), get_size(), base_stream::input_stream(), base_stream::invalid_operation(), Matrix, scanf_format_list::num_conversions(), and textscan_format_list::who.
|
virtual |
Implements base_stream.
Definition at line 37 of file oct-strstrm.cc.
References base_stream::error().
|
privateinherited |
Definition at line 4228 of file oct-stream.cc.
References __get_interpreter__(), base_stream::error(), base_stream::file_number(), base_stream::input_stream(), interpreter::interactive(), base_stream::invalid_operation(), and textscan_format_list::who.
|
virtual |
Implements base_stream.
Reimplemented in istrstream.
Definition at line 48 of file oct-strstrm.cc.
References base_stream::error().
|
privateinherited |
Definition at line 225 of file oct-stream.h.
|
privateinherited |
Definition at line 212 of file oct-stream.h.
|
privateinherited |
Definition at line 234 of file oct-stream.h.
Referenced by base_stream::clear(), and base_stream::error().
|
privateinherited |
Definition at line 228 of file oct-stream.h.
Referenced by base_stream::clear(), and base_stream::error().
|
privateinherited |
Definition at line 209 of file oct-stream.h.
|
privateinherited |
Definition at line 206 of file oct-stream.h.
|
privateinherited |
Definition at line 231 of file oct-stream.h.