#include <cassert>
#include <cctype>
#include <cstring>
#include <algorithm>
#include <deque>
#include <fstream>
#include <limits>
#include <iomanip>
#include <iostream>
#include <sstream>
#include <string>
#include "Array.h"
#include "Cell.h"
#include "byte-swap.h"
#include "lo-ieee.h"
#include "lo-mappers.h"
#include "lo-utils.h"
#include "oct-locbuf.h"
#include "octave-preserve-stream-state.h"
#include "quit.h"
#include "str-vec.h"
#include "strcase-wrappers.h"
#include "error.h"
#include "errwarn.h"
#include "input.h"
#include "interpreter-private.h"
#include "interpreter.h"
#include "octave.h"
#include "oct-iostrm.h"
#include "oct-stdstrm.h"
#include "oct-string.h"
#include "oct-stream.h"
#include "ov.h"
#include "ovl.h"
#include "pager.h"
#include "utils.h"
Go to the source code of this file.
Classes | |
class | delimited_stream |
class | printf_format_elt |
class | printf_format_list |
class | printf_value_cache |
class | scanf_format_elt |
class | scanf_format_list |
class | textscan |
class | textscan_format_elt |
class | textscan_format_list |
class | ultimate_element_type< T > |
class | ultimate_element_type< octave_int< T > > |
Macros | |
#define | BEGIN_C_CONVERSION() |
#define | BEGIN_CHAR_CLASS_CONVERSION() |
#define | BEGIN_S_CONVERSION() |
#define | DO_LITERAL_CONVERSION() |
#define | DO_PCT_CONVERSION() |
#define | DO_WHITESPACE_CONVERSION() |
#define | FILL_TABLE_ROW(T, V) |
#define | FINISH_CHARACTER_CONVERSION() |
#define | INSTANTIATE_WRITE(T) |
#define | TABLE_ELT(T, U, V, W) conv_fptr_table[oct_data_conv::T][oct_data_conv::U] = convert_and_copy<V, W> |
Typedefs | |
typedef octave_value(* | conv_fptr) (std::list< void * > &input_buf_list, octave_idx_type input_buf_elts, octave_idx_type elts_read, octave_idx_type nr, octave_idx_type nc, bool swap, bool do_float_fmt_conv, bool do_NA_conv, mach_info::float_format from_flt_fmt) |
Functions | |
template<typename SRC_T , typename DST_T > | |
static octave_value | convert_and_copy (std::list< void * > &input_buf_list, octave_idx_type input_buf_elts, octave_idx_type elts_read, octave_idx_type nr, octave_idx_type nc, bool swap, bool do_float_fmt_conv, bool do_NA_conv, mach_info::float_format from_flt_fmt) |
template<typename T , typename V > | |
static void | convert_chars (const void *data, void *conv_data, octave_idx_type n_elts) |
template<typename T > | |
static bool | convert_data (const T *data, void *conv_data, octave_idx_type n_elts, oct_data_conv::data_type output_type, mach_info::float_format flt_fmt) |
template<typename T , typename V > | |
static void | convert_ints (const T *data, void *conv_data, octave_idx_type n_elts, bool swap) |
static int | convert_to_valid_int (const octave_value &tc, int &conv_err) |
template<typename T > | |
static int | do_printf_conv (std::ostream &os, const char *fmt, int nsa, int sa_1, int sa_2, T arg, const std::string &who) |
static std::size_t | do_printf_string (std::ostream &os, const printf_format_elt *elt, int nsa, int sa_1, int sa_2, const std::string &arg, const std::string &who) |
template void | do_scanf_conv (std::istream &, const scanf_format_elt &, double *, Matrix &, double *, octave_idx_type &, octave_idx_type &, octave_idx_type, octave_idx_type, bool) |
template<typename T > | |
static void | do_scanf_conv (std::istream &is, const scanf_format_elt &fmt, T valptr, Matrix &mval, double *data, octave_idx_type &idx, octave_idx_type &conversion_count, octave_idx_type nr, octave_idx_type max_size, bool discard) |
static OCTAVE_NORETURN void | err_invalid_file_id (int fid, const std::string &who) |
static std::string | expand_char_class (const std::string &s) |
static void | get_size (const Array< double > &size, octave_idx_type &nr, octave_idx_type &nc, bool &one_elt_size_spec, const std::string &who) |
static octave_idx_type | get_size (double d, const std::string &who) |
static Cell | init_inf_nan (void) |
static bool | is_nan_or_inf (const octave_value &val) |
template<> | |
std::istream & | octave_scan (std::istream &is, const scanf_format_elt &fmt, double *valptr) |
template<typename T > | |
static std::istream & | octave_scan (std::istream &is, const scanf_format_elt &fmt, T *valptr) |
template<typename T > | |
static std::istream & | octave_scan_1 (std::istream &is, const scanf_format_elt &fmt, T *valptr) |
static bool | ok_for_signed_int_conv (const octave_value &val) |
static bool | ok_for_unsigned_int_conv (const octave_value &val) |
static double | pown (double x, unsigned int n) |
static std::string | switch_to_g_format (const printf_format_elt *elt) |
#define BEGIN_C_CONVERSION | ( | ) |
Definition at line 4555 of file oct-stream.cc.
#define BEGIN_CHAR_CLASS_CONVERSION | ( | ) |
Definition at line 4625 of file oct-stream.cc.
#define BEGIN_S_CONVERSION | ( | ) |
Definition at line 4576 of file oct-stream.cc.
#define DO_LITERAL_CONVERSION | ( | ) |
Definition at line 4509 of file oct-stream.cc.
#define DO_PCT_CONVERSION | ( | ) |
Definition at line 4537 of file oct-stream.cc.
#define DO_WHITESPACE_CONVERSION | ( | ) |
Definition at line 4495 of file oct-stream.cc.
#define FILL_TABLE_ROW | ( | T, | |
V | |||
) |
Definition at line 6512 of file oct-stream.cc.
#define FINISH_CHARACTER_CONVERSION | ( | ) |
Definition at line 4672 of file oct-stream.cc.
#define INSTANTIATE_WRITE | ( | T | ) |
Definition at line 7120 of file oct-stream.cc.
#define TABLE_ELT | ( | T, | |
U, | |||
V, | |||
W | |||
) | conv_fptr_table[oct_data_conv::T][oct_data_conv::U] = convert_and_copy<V, W> |
Definition at line 6509 of file oct-stream.cc.
typedef octave_value(* conv_fptr) (std::list< void * > &input_buf_list, octave_idx_type input_buf_elts, octave_idx_type elts_read, octave_idx_type nr, octave_idx_type nc, bool swap, bool do_float_fmt_conv, bool do_NA_conv, mach_info::float_format from_flt_fmt) |
Definition at line 6503 of file oct-stream.cc.
|
static |
Definition at line 6414 of file oct-stream.cc.
References do_float_format_conversion(), and native_float_format().
|
static |
Definition at line 6837 of file oct-stream.cc.
References V.
|
static |
Definition at line 6884 of file oct-stream.cc.
References do_double_format_conversion(), do_float_format_conversion(), oct_data_conv::dt_char, oct_data_conv::dt_double, oct_data_conv::dt_int16, oct_data_conv::dt_int32, oct_data_conv::dt_int64, oct_data_conv::dt_int8, oct_data_conv::dt_schar, oct_data_conv::dt_single, oct_data_conv::dt_uchar, oct_data_conv::dt_uint16, oct_data_conv::dt_uint32, oct_data_conv::dt_uint64, oct_data_conv::dt_uint8, error(), flt_fmt_ieee_big_endian, flt_fmt_ieee_little_endian, and words_big_endian().
Referenced by stream::write().
|
static |
Definition at line 6849 of file oct-stream.cc.
References V.
|
static |
Definition at line 89 of file oct-stream.cc.
References __get_interpreter__(), octave_value::double_value(), lo_ieee_isnan, nint(), and interpreter::recover_from_exception().
Referenced by stream_list::get_file_number(), stream_list::get_info(), stream::getl(), stream::gets(), stream::seek(), and stream::skipl().
|
static |
Definition at line 5687 of file oct-stream.cc.
References error(), format(), and textscan_format_list::who.
Referenced by base_stream::do_numeric_printf_conv().
|
static |
Definition at line 5715 of file oct-stream.cc.
References error(), printf_format_elt::flags, printf_format_elt::fw, left, len, printf_format_elt::prec, and textscan_format_list::who.
Referenced by base_stream::do_printf().
template void do_scanf_conv | ( | std::istream & | , |
const scanf_format_elt & | , | ||
double * | , | ||
Matrix & | , | ||
double * | , | ||
octave_idx_type & | , | ||
octave_idx_type & | , | ||
octave_idx_type | , | ||
octave_idx_type | , | ||
bool | |||
) |
|
static |
Definition at line 4461 of file oct-stream.cc.
References Array< T, Alloc >::fortran_vec(), octave_scan(), and Matrix::resize().
Referenced by base_stream::do_scanf().
|
static |
Definition at line 7452 of file oct-stream.cc.
References error().
Referenced by stream_list::lookup(), and stream_list::remove().
|
static |
Definition at line 207 of file oct-stream.cc.
References len.
Referenced by scanf_format_list::finish_conversion().
|
static |
Definition at line 158 of file oct-stream.cc.
References error(), get_size(), isinf(), max(), and Array< T, Alloc >::numel().
|
static |
Definition at line 129 of file oct-stream.cc.
References d, error(), isinf(), lo_ieee_isnan, max(), and nint_big().
Referenced by get_size(), stream::read(), and base_stream::scanf().
|
static |
Definition at line 1201 of file oct-stream.cc.
|
static |
Definition at line 5740 of file oct-stream.cc.
References octave_value::is_true(), octave_value::isinf(), and octave_value::isnan().
Referenced by opengl_renderer::clip_code(), and base_stream::do_numeric_printf_conv().
std::istream& octave_scan | ( | std::istream & | is, |
const scanf_format_elt & | fmt, | ||
double * | valptr | ||
) |
Definition at line 4423 of file oct-stream.cc.
References panic_impossible, and scanf_format_elt::type.
|
static |
Definition at line 4375 of file oct-stream.cc.
References octave_scan_1(), and scanf_format_elt::width.
Referenced by base_stream::do_oscanf(), and do_scanf_conv().
|
static |
Definition at line 4286 of file oct-stream.cc.
References scanf_format_elt::type.
Referenced by octave_scan().
|
static |
Definition at line 5749 of file oct-stream.cc.
References octave_value::double_value(), fix(), octave_value::is_string(), octave_value::is_uint64_type(), octave_value::isinteger(), max(), octave_value::uint64_scalar_value(), and octave_int< T >::value().
Referenced by base_stream::do_numeric_printf_conv().
|
static |
Definition at line 5779 of file oct-stream.cc.
References binary_op(), octave_value::double_value(), fix(), octave_value::is_string(), octave_value::is_true(), octave_value::isinteger(), max(), and octave_value::op_ge.
Referenced by base_stream::do_numeric_printf_conv().
|
static |
Definition at line 1186 of file oct-stream.cc.
Referenced by textscan::read_double().
|
static |
Definition at line 5806 of file oct-stream.cc.
References printf_format_elt::text, and printf_format_elt::type.
Referenced by base_stream::do_numeric_printf_conv().