GNU Octave
4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include "octave-config.h"
#include <iosfwd>
#include <string>
#include "mach-info.h"
#include "symtab.h"
Go to the source code of this file.
Classes | |
class | load_save_format |
Enumerations | |
enum | load_save_format_options { LS_MAT_ASCII_LONG = 1, LS_MAT_ASCII_TABS = 2, LS_MAT_BINARY_V5 = 1, LS_MAT_BINARY_V7, LS_NO_OPTION = 0 } |
enum | load_save_format_type { LS_TEXT, LS_BINARY, LS_MAT_ASCII, LS_MAT_BINARY, LS_MAT5_BINARY, LS_MAT7_BINARY, LS_HDF5, LS_UNKNOWN } |
Functions | |
octave_value | do_load (std::istream &stream, const std::string &orig_fname, load_save_format format, octave::mach_info::float_format flt_fmt, bool list_only, bool swap, bool verbose, const string_vector &argv, int argv_idx, int argc, int nargout) |
void | do_save (std::ostream &os, const symbol_table::symbol_record &sr, load_save_format fmt, bool save_as_floats) |
void | dump_octave_core (void) |
OCTINTERP_API bool | is_octave_data_file (const std::string &file) |
void | octave_finalize_hdf5 (void) |
void | octave_prepare_hdf5 (void) |
int | read_binary_file_header (std::istream &is, bool &swap, octave::mach_info::float_format &flt_fmt, bool quiet=false) |
void | write_header (std::ostream &os, load_save_format format) |
Enumerator | |
---|---|
LS_MAT_ASCII_LONG | |
LS_MAT_ASCII_TABS | |
LS_MAT_BINARY_V5 | |
LS_MAT_BINARY_V7 | |
LS_NO_OPTION |
Definition at line 50 of file load-save.h.
Enumerator | |
---|---|
LS_TEXT | |
LS_BINARY | |
LS_MAT_ASCII | |
LS_MAT_BINARY | |
LS_MAT5_BINARY | |
LS_MAT7_BINARY | |
LS_HDF5 | |
LS_UNKNOWN |
Definition at line 38 of file load-save.h.
octave_value do_load | ( | std::istream & | stream, |
const std::string & | orig_fname, | ||
load_save_format | format, | ||
octave::mach_info::float_format | flt_fmt, | ||
bool | list_only, | ||
bool | swap, | ||
bool | verbose, | ||
const string_vector & | argv, | ||
int | argv_idx, | ||
int | argc, | ||
int | nargout | ||
) |
Definition at line 344 of file load-save.cc.
References octave_scalar_map::assign(), octave_value::columns(), err_unrecognized_data_fmt(), error(), install_loaded_variable(), octave_value::is_defined(), left, string_vector::list_in_columns(), LS_BINARY, LS_HDF5, LS_MAT5_BINARY, LS_MAT7_BINARY, LS_MAT_ASCII, LS_MAT_BINARY, LS_TEXT, matches_patterns(), name, octave_scalar_map::nfields(), octave_stdout, read_binary_data(), read_hdf5_data(), read_mat5_binary_element(), read_mat_ascii_data(), read_mat_binary_data(), read_text_data(), retval, right, octave_value::rows(), string, load_save_format::type, octave_value::type_name(), and warning().
Referenced by if().
void do_save | ( | std::ostream & | os, |
const symbol_table::symbol_record & | sr, | ||
load_save_format | fmt, | ||
bool | save_as_floats | ||
) |
Definition at line 954 of file load-save.cc.
References do_save(), octave_value::is_defined(), symbol_table::symbol_record::is_global(), symbol_table::symbol_record::name(), name, string, val, and symbol_table::symbol_record::varval().
void dump_octave_core | ( | void | ) |
Definition at line 1355 of file load-save.cc.
References append, hdf5_fstreambase::close(), gzofstream::close(), defined, dump_octave_core(), file, hdf5_fstreambase::file_id, LS_BINARY, LS_HDF5, LS_MAT5_BINARY, LS_MAT7_BINARY, LS_MAT_BINARY, message(), mode, parse_save_options(), save_as_floats, octave::math::trunc(), Voctave_core_file_name, Voctave_core_file_options, and warning().
OCTINTERP_API bool is_octave_data_file | ( | const std::string & | file | ) |
Definition at line 526 of file load-save.cc.
References get_file_format(), LS_UNKNOWN, and use_zlib.
Referenced by files_dock_widget::display_directory().
void octave_finalize_hdf5 | ( | void | ) |
Definition at line 1248 of file load-save.cc.
void octave_prepare_hdf5 | ( | void | ) |
Definition at line 1240 of file load-save.cc.
int read_binary_file_header | ( | std::istream & | is, |
bool & | swap, | ||
octave::mach_info::float_format & | flt_fmt, | ||
bool | quiet = false |
||
) |
Definition at line 176 of file load-save.cc.
References error(), octave::mach_info::flt_fmt_unknown, mopt_digit_to_float_format(), octave::string::strncmp(), tmp, and octave::mach_info::words_big_endian().
Referenced by get_file_format(), and if().
void write_header | ( | std::ostream & | os, |
load_save_format | format | ||
) |
Definition at line 1157 of file load-save.cc.
References hdf5_fstreambase::file_id, float_format_to_mopt_digit(), LS_BINARY, LS_HDF5, LS_MAT5_BINARY, LS_MAT7_BINARY, LS_TEXT, min(), octave::mach_info::native_float_format(), now, number, OCTAVE_VERSION, octave::sys::base_tm::strftime(), string, tmp, load_save_format::type, Vsave_header_format_string, and octave::mach_info::words_big_endian().
Referenced by dump_octave_core(), and save_vars().