#include "oct-strstrm.h"
Public Member Functions | |
octave_ostrstream (const octave_ostrstream &)=delete | |
octave_ostrstream (std::ios::openmode arg_md=std::ios::out, octave::mach_info::float_format ff=octave::mach_info::native_float_format(), const std::string &encoding="utf-8") | |
bool | bad (void) const |
void | clear (void) |
void | close (void) |
virtual void | do_close (void) |
bool | eof (void) const |
std::string | error (bool clear, int &err_num) |
virtual int | file_number (void) const |
std::istream * | input_stream (void) |
bool | is_open (void) const |
std::string | name (void) const |
bool | ok (void) const |
octave_ostrstream & | operator= (const octave_ostrstream &)=delete |
std::ostream * | output_stream (void) |
std::streambuf * | rdbuf (void) |
int | seek (off_t, int) |
std::string | str (void) |
virtual off_t | tell (void) |
Static Public Member Functions | |
static octave::stream | create (std::ios::openmode arg_md=std::ios::out, octave::mach_info::float_format ff=octave::mach_info::native_float_format(), const std::string &encoding="utf-8") |
Protected Member Functions | |
~octave_ostrstream (void)=default | |
void | clearerr (void) |
std::string | encoding (void) const |
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 Member Functions | |
std::string | do_gets (octave_idx_type max_len, bool &err, bool strip_newline, const std::string &who) |
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) |
bool | do_oscanf (const scanf_format_elt *elt, octave_value &, const std::string &who) |
int | do_printf (printf_format_list &fmt_list, const octave_value_list &args, const std::string &who) |
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) |
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) |
void | field_width_error (const std::string &who) const |
int | flush (void) |
std::string | getl (octave_idx_type max_len, bool &err, const std::string &who) |
std::string | gets (octave_idx_type max_len, bool &err, const std::string &who) |
void | invalid_operation (const std::string &who, const char *rw) |
octave_value_list | oscanf (const std::string &fmt, const std::string &who) |
int | printf (const std::string &fmt, const octave_value_list &args, const std::string &who) |
int | puts (const std::string &s, const std::string &who) |
octave_value | scanf (const std::string &fmt, const Array< double > &size, octave_idx_type &count, const std::string &who) |
off_t | skipl (off_t count, bool &err, const std::string &who) |
Private Attributes | |
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 |
std::ostringstream | m_ostream |
Definition at line 146 of file oct-strstrm.h.
|
inline |
Definition at line 151 of file oct-strstrm.h.
|
delete |
|
protecteddefault |
|
inlinevirtual |
Implements octave_base_strstream.
Definition at line 190 of file oct-strstrm.h.
|
inlinevirtual |
Implements octave_base_strstream.
Definition at line 192 of file oct-strstrm.h.
|
protectedinherited |
Definition at line 4009 of file oct-stream.cc.
References octave::base_stream::input_stream(), and octave::base_stream::output_stream().
|
inlineinherited |
Definition at line 124 of file oct-stream.h.
|
static |
Definition at line 73 of file oct-strstrm.cc.
References octave::base_stream::encoding().
|
inlinevirtualinherited |
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 122 of file oct-stream.h.
|
privateinherited |
Definition at line 4025 of file oct-stream.cc.
References octave::__get_interpreter__(), octave::base_stream::encoding(), octave::base_stream::error(), octave::base_stream::file_number(), octave::base_stream::input_stream(), octave::interpreter::interactive(), octave::base_stream::invalid_operation(), retval, and octave::string::u8_from_encoding().
Referenced by octave::base_stream::do_oscanf(), octave::base_stream::do_scanf(), octave::base_stream::getl(), and octave::base_stream::gets().
|
privateinherited |
Definition at line 5746 of file oct-stream.cc.
References octave::do_printf_conv(), octave_value::double_value(), octave::base_stream::encoding(), octave::base_stream::error(), octave::printf_format_elt::flags, octave_value::int64_scalar_value(), octave::is_nan_or_inf(), lo_ieee_is_NA, lo_ieee_isinf, octave::ok_for_signed_int_conv(), octave::ok_for_unsigned_int_conv(), octave::printf_format_elt::prec, retval, octave::switch_to_g_format(), octave::printf_format_elt::text, octave::printf_format_elt::type, octave_value::uint64_scalar_value(), and octave_int< T >::value().
Referenced by octave::base_stream::do_printf().
|
privateinherited |
Definition at line 5076 of file oct-stream.cc.
References octave::__get_interpreter__(), BEGIN_C_CONVERSION, BEGIN_CHAR_CLASS_CONVERSION, BEGIN_S_CONVERSION, octave::scanf_format_elt::discard, octave::base_stream::do_gets(), DO_LITERAL_CONVERSION, DO_PCT_CONVERSION, DO_WHITESPACE_CONVERSION, octave::base_stream::error(), octave::application::forced_interactive(), octave::base_stream::input_stream(), octave::interpreter::interactive(), octave::scanf_format_elt::literal_conversion, octave::scanf_format_elt::modifier, octave::base_stream::name(), octave::octave_scan(), octave::base_stream::ok(), retval, octave::scanf_format_elt::text, octave::scanf_format_elt::type, and octave::scanf_format_elt::whitespace_conversion.
Referenced by octave::base_stream::oscanf().
|
privateinherited |
Definition at line 5873 of file oct-stream.cc.
References octave::printf_format_elt::args, octave::base_stream::do_numeric_printf_conv(), octave::do_printf_string(), octave::base_stream::encoding(), octave::base_stream::error(), octave::printf_value_cache::exhausted(), octave::base_stream::field_width_error(), octave::printf_format_list::first(), octave::printf_format_elt::fw, octave::printf_value_cache::get_next_value(), octave::printf_value_cache::int_value(), octave::base_stream::invalid_operation(), octave_value::is_string(), octave_value::isempty(), octave::printf_format_list::next(), octave::printf_format_list::num_conversions(), octave::base_stream::output_stream(), octave::printf_format_elt::prec, retval, octave_value::string_value(), octave::printf_format_elt::text, octave::printf_format_elt::type, and octave::string::u8_to_encoding().
Referenced by octave::base_stream::printf().
|
privateinherited |
Definition at line 4644 of file oct-stream.cc.
References octave::__get_interpreter__(), octave::scanf_format_list::all_character_conversions(), BEGIN_C_CONVERSION, BEGIN_CHAR_CLASS_CONVERSION, BEGIN_S_CONVERSION, octave::scanf_format_elt::discard, octave::base_stream::do_gets(), DO_LITERAL_CONVERSION, DO_PCT_CONVERSION, octave::do_scanf_conv(), DO_WHITESPACE_CONVERSION, octave::base_stream::error(), octave::base_stream::file_number(), FINISH_CHARACTER_CONVERSION, octave::scanf_format_list::first(), octave::application::forced_interactive(), Array< T >::fortran_vec(), octave::base_stream::input_stream(), octave::interpreter::interactive(), octave::scanf_format_list::length(), octave::scanf_format_elt::literal_conversion, octave::scanf_format_elt::modifier, octave::base_stream::name(), octave::scanf_format_list::next(), octave::scanf_format_elt::null, octave::scanf_format_list::num_conversions(), octave::base_stream::ok(), panic_impossible, Matrix::resize(), retval, octave::scanf_format_elt::text, octave::scanf_format_elt::type, and octave::scanf_format_elt::whitespace_conversion.
Referenced by octave::base_stream::scanf().
|
privateinherited |
Definition at line 5366 of file oct-stream.cc.
References octave::__get_interpreter__(), octave::base_stream::encoding(), octave::base_stream::error(), octave::base_stream::file_number(), octave::base_stream::input_stream(), octave::interpreter::interactive(), octave::base_stream::invalid_operation(), retval, and scanner.
|
inlineprotectedinherited |
Definition at line 159 of file oct-stream.h.
Referenced by octave_istrstream::create(), octave_iprocstream::create(), octave_oprocstream::create(), create(), octave::base_stream::do_gets(), octave::base_stream::do_numeric_printf_conv(), octave::base_stream::do_printf(), and octave::base_stream::do_textscan().
|
inlinevirtual |
Implements octave::base_stream.
Definition at line 177 of file oct-strstrm.h.
|
inherited |
Definition at line 6050 of file oct-stream.cc.
References octave::base_stream::clear(), octave::base_stream::m_errmsg, and octave::base_stream::m_fail.
Referenced by octave_fstream::octave_fstream(), octave::base_stream::do_gets(), octave::base_stream::do_numeric_printf_conv(), octave::base_stream::do_oscanf(), octave::base_stream::do_printf(), octave::base_stream::do_scanf(), octave::base_stream::do_textscan(), octave::base_stream::field_width_error(), octave::base_stream::invalid_operation(), octave_base_iostream::invalid_operation(), octave::base_stream::oscanf(), octave::base_stream::printf(), octave::base_stream::puts(), octave::base_stream::scanf(), octave_fstream::seek(), octave_base_strstream::seek(), octave::base_stream::skipl(), octave_fstream::tell(), and octave_base_strstream::tell().
|
protectedinherited |
Definition at line 3988 of file oct-stream.cc.
References octave::base_stream::m_errmsg, and octave::base_stream::m_fail.
|
protectedinherited |
Definition at line 3995 of file oct-stream.cc.
References octave::base_stream::m_errmsg, and octave::base_stream::m_fail.
|
privateinherited |
Definition at line 5866 of file oct-stream.cc.
References octave::base_stream::error().
Referenced by octave::base_stream::do_printf().
|
inlinevirtualinherited |
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 133 of file oct-stream.h.
References name.
Referenced by octave::base_stream::do_gets(), octave::base_stream::do_scanf(), octave::base_stream::do_textscan(), and octave::base_stream::skipl().
|
inlineprotectedinherited |
Definition at line 157 of file oct-stream.h.
|
privateinherited |
Definition at line 5398 of file oct-stream.cc.
References octave::base_stream::invalid_operation(), octave::base_stream::output_stream(), and retval.
|
privateinherited |
Definition at line 4129 of file oct-stream.cc.
References octave::base_stream::do_gets().
|
privateinherited |
Definition at line 4136 of file oct-stream.cc.
References octave::base_stream::do_gets().
|
inlinevirtual |
Reimplemented from octave::base_stream.
Definition at line 179 of file oct-strstrm.h.
|
privateinherited |
Definition at line 6063 of file oct-stream.cc.
References octave::base_stream::error().
Referenced by octave::base_stream::do_gets(), octave::base_stream::do_printf(), octave::base_stream::do_textscan(), octave::base_stream::flush(), octave::base_stream::oscanf(), octave::base_stream::puts(), octave::base_stream::scanf(), and octave::base_stream::skipl().
|
inlineinherited |
Definition at line 120 of file oct-stream.h.
|
inlineprotectedinherited |
Definition at line 155 of file oct-stream.h.
Referenced by octave_fstream::input_stream(), and octave_fstream::output_stream().
|
inlinevirtualinherited |
Implements octave::base_stream.
Definition at line 69 of file oct-strstrm.h.
|
inlineinherited |
Definition at line 147 of file oct-stream.h.
Referenced by octave::base_stream::do_oscanf(), octave::base_stream::do_scanf(), and octave::base_stream::oscanf().
|
delete |
|
privateinherited |
Definition at line 5292 of file oct-stream.cc.
References octave::base_stream::do_oscanf(), octave::base_stream::error(), octave::scanf_format_list::first(), octave::base_stream::input_stream(), octave::base_stream::invalid_operation(), octave_value::is_defined(), len, octave::scanf_format_list::length(), octave::scanf_format_list::next(), octave::scanf_format_list::num_conversions(), octave::base_stream::ok(), Array< T >::resize(), and retval.
|
inlinevirtual |
Reimplemented from octave::base_stream.
Definition at line 181 of file oct-strstrm.h.
|
privateinherited |
Definition at line 5998 of file oct-stream.cc.
References octave::base_stream::do_printf(), octave::base_stream::error(), and octave::printf_format_list::num_conversions().
|
privateinherited |
Definition at line 6011 of file oct-stream.cc.
References octave::base_stream::error(), octave::base_stream::invalid_operation(), octave::base_stream::output_stream(), and retval.
|
inlinevirtual |
Implements octave_base_strstream.
Definition at line 185 of file oct-strstrm.h.
|
privateinherited |
Definition at line 5042 of file oct-stream.cc.
References octave::base_stream::do_scanf(), octave::base_stream::error(), octave::get_size(), octave::base_stream::input_stream(), octave::base_stream::invalid_operation(), octave::scanf_format_list::num_conversions(), and retval.
|
virtualinherited |
Implements octave::base_stream.
Definition at line 35 of file oct-strstrm.cc.
References octave::base_stream::error().
|
privateinherited |
Definition at line 4143 of file oct-stream.cc.
References octave::__get_interpreter__(), octave::base_stream::error(), octave::base_stream::file_number(), octave::base_stream::input_stream(), octave::interpreter::interactive(), and octave::base_stream::invalid_operation().
|
inline |
Definition at line 183 of file oct-strstrm.h.
Referenced by Fsprintf().
|
virtualinherited |
Implements octave::base_stream.
Reimplemented in octave_istrstream.
Definition at line 46 of file oct-strstrm.cc.
References octave::base_stream::error().
|
privateinherited |
Definition at line 184 of file oct-stream.h.
|
privateinherited |
Definition at line 193 of file oct-stream.h.
Referenced by octave::base_stream::clear(), and octave::base_stream::error().
|
privateinherited |
Definition at line 187 of file oct-stream.h.
Referenced by octave::base_stream::clear(), and octave::base_stream::error().
|
privateinherited |
Definition at line 181 of file oct-stream.h.
|
privateinherited |
Definition at line 178 of file oct-stream.h.
|
privateinherited |
Definition at line 190 of file oct-stream.h.
|
private |
Definition at line 196 of file oct-strstrm.h.