Public Member Functions | |
textscan (const std::string &who_arg="textscan", const std::string &encoding="utf-8") | |
textscan (const textscan &)=delete | |
~textscan (void)=default | |
textscan & | operator= (const textscan &)=delete |
octave_value | scan (std::istream &isp, const std::string &fmt, octave_idx_type ntimes, const octave_value_list &options, octave_idx_type &read_count) |
Private Attributes | |
std::string | m_buf |
octave_idx_type | m_buffer_size |
bool | m_collect_output |
int | m_comment_char |
int | m_comment_len |
Cell | m_comment_style |
std::string | m_date_locale |
bool | m_default_exp |
int | m_delim_len |
Cell | m_delim_list |
std::string | m_delim_table |
std::string | m_delims |
octave_value | m_empty_value |
std::string | m_encoding |
short | m_eol1 |
short | m_eol2 |
std::string | m_exp_chars |
int | m_header_lines |
Cell | m_inf_nan |
octave_idx_type | m_lines |
short | m_return_on_error |
Cell | m_treat_as_empty |
int | m_treat_as_empty_len |
std::string | m_whitespace |
std::string | m_whitespace_table |
std::string | m_who |
bool | multiple_delims_as_one |
Friends | |
class | textscan_format_list |
Definition at line 1805 of file oct-stream.cc.
octave::textscan::textscan | ( | const std::string & | who_arg = "textscan" , |
const std::string & | encoding = "utf-8" |
||
) |
Definition at line 2549 of file oct-stream.cc.
|
delete |
|
default |
|
private |
Definition at line 2585 of file oct-stream.cc.
References cat_op(), error(), m_buffer_size, m_collect_output, m_comment_len, m_delim_len, m_delim_table, m_delims, m_eol1, m_eol2, m_header_lines, m_lines, m_return_on_error, m_treat_as_empty_len, m_whitespace, m_who, max(), min(), multiple_delims_as_one, octave::textscan_format_list::num_conversions(), octave::textscan_format_list::numel(), octave_value(), octave::textscan_format_list::out_buf(), ra_idx, octave::textscan_format_list::read_first_row(), read_format_once(), octave::textscan_format_list::set_from_first, and skip_delim().
Referenced by scan().
|
inlineprivate |
Definition at line 1879 of file oct-stream.cc.
Referenced by read_format_once(), scan_string(), and skip_delim().
Definition at line 1886 of file oct-stream.cc.
Referenced by parse_options(), skip_delim(), and skip_whitespace().
|
private |
Definition at line 3885 of file oct-stream.cc.
References octave::delimited_stream::clear(), Array< T, Alloc >::numel(), octave_strncasecmp(), octave::delimited_stream::read(), octave::delimited_stream::seekg(), octave::string::strncmp(), and octave::delimited_stream::tellg().
Referenced by read_double(), read_format_once(), and skip_delim().
|
private |
Definition at line 3999 of file oct-stream.cc.
References octave::delimited_stream::get_undelim(), octave::delimited_stream::putback(), octave::delimited_stream::setstate(), skip_whitespace(), octave::textscan_format_elt::text, and octave::textscan_format_elt::width.
Referenced by read_format_once().
|
private |
Definition at line 3571 of file oct-stream.cc.
References octave_value_list::cell_value(), do_string_escapes(), error(), octave::textscan_format_list::has_string, isspace(), len, octave_value_list::length(), m_buffer_size, m_collect_output, m_comment_char, m_comment_len, m_comment_style, m_default_exp, m_delim_len, m_delim_list, m_delim_table, m_delims, m_empty_value, m_eol1, m_eol2, m_exp_chars, m_header_lines, m_return_on_error, m_treat_as_empty, m_treat_as_empty_len, m_whitespace, m_whitespace_table, m_who, max(), multiple_delims_as_one, Array< T, Alloc >::numel(), Array< T, Alloc >::size(), and transform().
Referenced by scan().
|
private |
Definition at line 2787 of file oct-stream.cc.
References octave::delimited_stream::clear(), octave::delimited_stream::get(), Inf, lookahead(), m_exp_chars, m_inf_nan, NaN, octave::delimited_stream::peek(), octave::pown(), octave::textscan_format_elt::prec, octave::delimited_stream::putback(), octave::delimited_stream::rdstate(), octave::delimited_stream::setstate(), and octave::textscan_format_elt::width.
Referenced by scan_complex(), and scan_one().
|
private |
Definition at line 3446 of file oct-stream.cc.
References octave::delimited_stream::clear(), elem, octave::delimited_stream::eof(), error(), octave::delimited_stream::fail(), octave::textscan_format_list::first(), is_delim(), Array< T, Alloc >::isempty(), octave::textscan_format_elt::literal_conversion, lookahead(), m_delim_len, m_delim_list, m_who, match_literal(), octave::textscan_format_list::next(), octave::textscan_format_list::numel(), octave::delimited_stream::peek(), octave::delimited_stream::rdstate(), scan_one(), octave::delimited_stream::seekg(), octave::delimited_stream::setstate(), skip_delim(), octave::delimited_stream::tellg(), and warning().
Referenced by do_scan().
|
private |
Definition at line 3105 of file oct-stream.cc.
References octave::delimited_stream::eof(), octave::delimited_stream::get_undelim(), m_eol1, m_eol2, octave::next, Array< T, Alloc >::numel(), octave::delimited_stream::putback(), and scan_caret().
Referenced by scan_string().
octave_value octave::textscan::scan | ( | std::istream & | isp, |
const std::string & | fmt, | ||
octave_idx_type | ntimes, | ||
const octave_value_list & | options, | ||
octave_idx_type & | read_count | ||
) |
Definition at line 2562 of file oct-stream.cc.
References do_scan(), parse_options(), and octave::state.
|
private |
Definition at line 3202 of file oct-stream.cc.
References octave::delimited_stream::get_undelim(), and octave::delimited_stream::putback().
Referenced by scan_one().
|
private |
Definition at line 3080 of file oct-stream.cc.
References octave::delimited_stream::eof(), octave::delimited_stream::get_undelim(), and octave::delimited_stream::putback().
Referenced by read_until(), scan_one(), scan_qstring(), and skip_whitespace().
|
private |
Definition at line 2939 of file oct-stream.cc.
References octave::delimited_stream::clear(), octave::delimited_stream::eof(), octave::delimited_stream::fail(), octave::delimited_stream::get(), Inf, octave::math::is_NaN_or_NA(), m_empty_value, m_treat_as_empty, m_treat_as_empty_len, Array< T, Alloc >::numel(), octave::delimited_stream::peek(), octave::delimited_stream::putback(), octave::delimited_stream::rdstate(), octave::delimited_stream::read(), read_double(), octave_value::scalar_value(), octave::delimited_stream::seekg(), octave::state, octave::string::strncmp(), and octave::delimited_stream::tellg().
Referenced by octave::textscan_format_list::read_first_row(), and scan_one().
|
private |
Definition at line 3254 of file oct-stream.cc.
References octave::delimited_stream::get_undelim(), m_encoding, octave::string::u8_from_encoding(), and octave::textscan_format_elt::width.
Referenced by scan_one().
|
private |
Definition at line 3279 of file oct-stream.cc.
References octave::textscan_format_elt::bitwidth, cat_op(), octave::textscan_format_elt::char_class, octave::delimited_stream::clear(), octave::textscan_format_elt::discard, octave::delimited_stream::fail(), octave_base_value::fast_elem_insert(), octave::delimited_stream::field_done(), octave_value::internal_rep(), octave_value::isreal(), m_empty_value, octave::textscan_format_elt::numeric, octave::delimited_stream::rdstate(), read_double(), scan_bracket(), scan_caret(), scan_complex(), scan_cstring(), scan_qstring(), scan_string(), skip_whitespace(), and octave::textscan_format_elt::type.
Referenced by read_format_once().
|
private |
Definition at line 3222 of file oct-stream.cc.
References octave::delimited_stream::get(), octave::delimited_stream::get_undelim(), m_encoding, octave::delimited_stream::peek(), octave::delimited_stream::peek_undelim(), scan_caret(), scan_string(), skip_whitespace(), and octave::string::u8_from_encoding().
Referenced by scan_one().
|
private |
Definition at line 3154 of file oct-stream.cc.
References octave::delimited_stream::get(), is_delim(), Array< T, Alloc >::isempty(), m_delim_list, m_encoding, m_eol1, m_eol2, max(), Array< T, Alloc >::numel(), octave::delimited_stream::putback(), read_until(), octave::string::u8_from_encoding(), and octave::textscan_format_elt::width.
Referenced by scan_one(), and scan_qstring().
|
private |
Definition at line 3923 of file oct-stream.cc.
References octave::delimited_stream::get(), octave::delimited_stream::get_undelim(), is_delim(), isspace(), lookahead(), m_delim_len, m_delim_list, m_eol1, m_eol2, m_lines, multiple_delims_as_one, Array< T, Alloc >::numel(), octave::delimited_stream::peek_undelim(), octave::delimited_stream::putback(), and skip_whitespace().
Referenced by do_scan(), octave::textscan_format_list::read_first_row(), and read_format_once().
|
private |
Definition at line 3795 of file oct-stream.cc.
References octave::delimited_stream::clear(), octave::delimited_stream::eof(), octave::delimited_stream::get_undelim(), isspace(), m_comment_char, m_comment_len, m_comment_style, m_eol1, m_eol2, m_lines, Array< T, Alloc >::numel(), octave::delimited_stream::peek_undelim(), octave::delimited_stream::putback(), octave::delimited_stream::rdstate(), octave::delimited_stream::read(), scan_caret(), octave::delimited_stream::seekg(), octave::state, octave::string::strncmp(), and octave::delimited_stream::tellg().
Referenced by match_literal(), octave::textscan_format_list::read_first_row(), scan_one(), scan_qstring(), and skip_delim().
|
inlineprivate |
Definition at line 1890 of file oct-stream.cc.
|
friend |
Definition at line 1829 of file oct-stream.cc.
|
private |
Definition at line 1899 of file oct-stream.cc.
|
private |
Definition at line 1922 of file oct-stream.cc.
Referenced by do_scan(), and parse_options().
|
private |
Definition at line 1949 of file oct-stream.cc.
Referenced by do_scan(), and parse_options().
|
private |
Definition at line 1920 of file oct-stream.cc.
Referenced by parse_options(), and skip_whitespace().
|
private |
Definition at line 1917 of file oct-stream.cc.
Referenced by do_scan(), parse_options(), and skip_whitespace().
|
private |
Definition at line 1914 of file oct-stream.cc.
Referenced by parse_options(), and skip_whitespace().
|
private |
Definition at line 1924 of file oct-stream.cc.
|
private |
Definition at line 1951 of file oct-stream.cc.
Referenced by parse_options().
|
private |
Definition at line 1933 of file oct-stream.cc.
Referenced by do_scan(), parse_options(), read_format_once(), and skip_delim().
|
private |
Definition at line 1930 of file oct-stream.cc.
Referenced by parse_options(), read_format_once(), scan_string(), and skip_delim().
|
private |
Definition at line 1909 of file oct-stream.cc.
Referenced by do_scan(), and parse_options().
|
private |
Definition at line 1912 of file oct-stream.cc.
Referenced by do_scan(), and parse_options().
|
private |
Definition at line 1935 of file oct-stream.cc.
Referenced by parse_options(), octave::textscan_format_list::read_first_row(), scan_complex(), and scan_one().
|
private |
Definition at line 1897 of file oct-stream.cc.
Referenced by scan_cstring(), scan_qstring(), and scan_string().
|
private |
Definition at line 1945 of file oct-stream.cc.
Referenced by do_scan(), parse_options(), octave::textscan_format_list::read_first_row(), read_until(), scan_string(), skip_delim(), and skip_whitespace().
|
private |
Definition at line 1946 of file oct-stream.cc.
Referenced by do_scan(), parse_options(), octave::textscan_format_list::read_first_row(), read_until(), scan_string(), skip_delim(), and skip_whitespace().
|
private |
Definition at line 1936 of file oct-stream.cc.
Referenced by parse_options(), and read_double().
|
private |
Definition at line 1937 of file oct-stream.cc.
Referenced by do_scan(), and parse_options().
|
private |
Definition at line 1927 of file oct-stream.cc.
Referenced by read_double().
|
private |
Definition at line 1953 of file oct-stream.cc.
Referenced by do_scan(), skip_delim(), and skip_whitespace().
|
private |
Definition at line 1947 of file oct-stream.cc.
Referenced by do_scan(), and parse_options().
|
private |
Definition at line 1938 of file oct-stream.cc.
Referenced by parse_options(), and scan_complex().
|
private |
Definition at line 1941 of file oct-stream.cc.
Referenced by do_scan(), parse_options(), and scan_complex().
|
private |
Definition at line 1943 of file oct-stream.cc.
Referenced by do_scan(), and parse_options().
|
private |
Definition at line 1906 of file oct-stream.cc.
Referenced by parse_options().
|
private |
Definition at line 1895 of file oct-stream.cc.
Referenced by do_scan(), parse_options(), and read_format_once().
|
private |
Definition at line 1950 of file oct-stream.cc.
Referenced by do_scan(), parse_options(), and skip_delim().