#include "load-save.h"
Public Types | |
enum | format_options { MAT_ASCII_LONG = 1 , MAT_ASCII_TABS = 2 , MAT_BINARY_V5 = 1 , MAT_BINARY_V7 , NO_OPTION = 0 } |
enum | format_type { TEXT , BINARY , MAT_ASCII , MAT_BINARY , MAT5_BINARY , MAT7_BINARY , HDF5 , UNKNOWN } |
Public Member Functions | |
load_save_system (interpreter &interp) | |
~load_save_system () | |
bool | crash_dumps_octave_core () const |
bool | crash_dumps_octave_core (bool flag) |
octave_value | crash_dumps_octave_core (const octave_value_list &args, int nargout) |
void | dump_octave_core () |
octave_value_list | load (const octave_value_list &args=octave_value_list(), int nargout=0) |
octave_value | load_vars (std::istream &stream, const std::string &orig_fname, const load_save_format &fmt, mach_info::float_format flt_fmt, bool list_only, bool swap, bool verbose, const string_vector &argv, int argv_idx, int argc, int nargout) |
double | octave_core_file_limit () const |
octave_value | octave_core_file_limit (const octave_value_list &args, int nargout) |
double | octave_core_file_limit (double limit) |
std::string | octave_core_file_name () const |
octave_value | octave_core_file_name (const octave_value_list &args, int nargout) |
std::string | octave_core_file_name (const std::string &file) |
std::string | octave_core_file_options () const |
octave_value | octave_core_file_options (const octave_value_list &args, int nargout) |
std::string | octave_core_file_options (const std::string &options) |
octave_value_list | save (const octave_value_list &args=octave_value_list(), int nargout=0) |
std::string | save_default_options () const |
octave_value | save_default_options (const octave_value_list &args, int nargout) |
std::string | save_default_options (const std::string &options) |
std::string | save_header_format_string () const |
octave_value | save_header_format_string (const octave_value_list &args, int nargout) |
std::string | save_header_format_string (const std::string &format) |
void | save_vars (const string_vector &argv, int argv_idx, int argc, std::ostream &os, const load_save_format &fmt, bool save_as_floats, bool write_header_info) |
Static Public Member Functions | |
static load_save_format | get_file_format (const std::string &fname, const std::string &orig_fname, bool &use_zlib, bool quiet=false) |
static string_vector | parse_save_options (const std::string &arg, load_save_format &fmt, bool &append, bool &save_as_floats, bool &use_zlib) |
static string_vector | parse_save_options (const string_vector &argv, load_save_format &fmt, bool &append, bool &save_as_floats, bool &use_zlib) |
Definition at line 44 of file load-save.h.
Enumerator | |
---|---|
MAT_ASCII_LONG | |
MAT_ASCII_TABS | |
MAT_BINARY_V5 | |
MAT_BINARY_V7 | |
NO_OPTION |
Definition at line 64 of file load-save.h.
Enumerator | |
---|---|
TEXT | |
BINARY | |
MAT_ASCII | |
MAT_BINARY | |
MAT5_BINARY | |
MAT7_BINARY | |
HDF5 | |
UNKNOWN |
Definition at line 52 of file load-save.h.
load_save_system::load_save_system | ( | interpreter & | interp | ) |
Definition at line 254 of file load-save.cc.
load_save_system::~load_save_system | ( | ) |
Definition at line 268 of file load-save.cc.
|
inline |
Definition at line 85 of file load-save.h.
|
inline |
Definition at line 90 of file load-save.h.
octave_value load_save_system::crash_dumps_octave_core | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 276 of file load-save.cc.
References octave::set_internal_variable().
Referenced by octave::Fcrash_dumps_octave_core().
void load_save_system::dump_octave_core | ( | ) |
Definition at line 734 of file load-save.cc.
References BINARY, gzofstream::close(), hdf5_fstreambase::close(), hdf5_fstreambase::file_id, HDF5, MAT5_BINARY, MAT7_BINARY, MAT_BINARY, message(), ofstream(), parse_save_options(), trunc(), load_save_format::type(), and warning().
|
static |
Definition at line 324 of file load-save.cc.
References get_ASCII_filename(), HDF5, and UNKNOWN.
octave_value_list load_save_system::load | ( | const octave_value_list & | args = octave_value_list () , |
int | nargout = 0 |
||
) |
Definition at line 1167 of file load-save.cc.
References BINARY, err_disabled_feature(), error(), flt_fmt_unknown, format(), HDF5, octave_value_list::length(), load_vars(), octave_value_list::make_argv(), MAT5_BINARY, MAT7_BINARY, MAT_ASCII, MAT_BINARY, print_usage(), TEXT, octave::sys::file_ops::tilde_expand(), UNKNOWN, and warning().
Referenced by octave::Fload().
octave_value load_save_system::load_vars | ( | std::istream & | stream, |
const std::string & | orig_fname, | ||
const load_save_format & | fmt, | ||
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 378 of file load-save.cc.
References BINARY, MAT_ASCII, MAT_BINARY, read_binary_data(), read_mat_ascii_data(), read_text_data(), TEXT, and load_save_format::type().
Referenced by load().
|
inline |
Definition at line 98 of file load-save.h.
octave_value load_save_system::octave_core_file_limit | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 284 of file load-save.cc.
References octave::set_internal_variable().
Referenced by octave::Foctave_core_file_limit().
|
inline |
Definition at line 103 of file load-save.h.
|
inline |
Definition at line 111 of file load-save.h.
octave_value load_save_system::octave_core_file_name | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 292 of file load-save.cc.
References octave::set_internal_variable().
Referenced by octave::Foctave_core_file_name().
|
inline |
Definition at line 116 of file load-save.h.
|
inline |
Definition at line 137 of file load-save.h.
octave_value load_save_system::octave_core_file_options | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 308 of file load-save.cc.
References octave::set_internal_variable().
Referenced by octave::Foctave_core_file_options().
|
inline |
Definition at line 142 of file load-save.h.
|
static |
Definition at line 655 of file load-save.cc.
References string_vector::append(), and parse_save_options().
|
static |
Definition at line 529 of file load-save.cc.
References string_vector::append(), BINARY, err_disabled_feature(), error(), HDF5, MAT5_BINARY, MAT7_BINARY, MAT_ASCII, MAT_ASCII_LONG, MAT_ASCII_TABS, MAT_BINARY, string_vector::numel(), load_save_format::set_option(), load_save_format::set_type(), TEXT, load_save_format::type(), and warning().
Referenced by dump_octave_core(), parse_save_options(), and save().
octave_value_list load_save_system::save | ( | const octave_value_list & | args = octave_value_list () , |
int | nargout = 0 |
||
) |
Definition at line 1411 of file load-save.cc.
References error(), format(), HDF5, octave_value_list::make_argv(), string_vector::numel(), octave_stdout, octave_value(), parse_save_options(), print_usage(), save_default_options(), save_vars(), TEXT, and warning().
Referenced by octave::Fsave().
|
inline |
Definition at line 124 of file load-save.h.
Referenced by save().
octave_value load_save_system::save_default_options | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 300 of file load-save.cc.
References octave::set_internal_variable().
Referenced by octave::Fsave_default_options().
|
inline |
Definition at line 129 of file load-save.h.
|
inline |
Definition at line 150 of file load-save.h.
octave_value load_save_system::save_header_format_string | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 316 of file load-save.cc.
References octave::set_internal_variable().
Referenced by octave::Fsave_header_format_string().
|
inline |
Definition at line 155 of file load-save.h.
References format().
void load_save_system::save_vars | ( | const string_vector & | argv, |
int | argv_idx, | ||
int | argc, | ||
std::ostream & | os, | ||
const load_save_format & | fmt, | ||
bool | save_as_floats, | ||
bool | write_header_info | ||
) |
Definition at line 674 of file load-save.cc.
References error(), interpreter::is_variable(), octave_value::isstruct(), octave_value::numel(), octave_value::scalar_map_value(), interpreter::varval(), and warning().
Referenced by save().