Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #if !defined (octave_load_save_h)
00024 #define octave_load_save_h 1
00025
00026 #include <iosfwd>
00027 #include <string>
00028
00029 class octave_value;
00030
00031
00032
00033 enum load_save_format_type
00034 {
00035 LS_ASCII,
00036 LS_BINARY,
00037 LS_MAT_ASCII,
00038 LS_MAT_BINARY,
00039 LS_MAT5_BINARY,
00040 LS_MAT7_BINARY,
00041 #ifdef HAVE_HDF5
00042 LS_HDF5,
00043 #endif
00044 LS_UNKNOWN
00045 };
00046
00047 enum load_save_format_options
00048 {
00049
00050 LS_MAT_ASCII_LONG = 1,
00051 LS_MAT_ASCII_TABS = 2,
00052
00053 LS_MAT_BINARY_V5 = 1,
00054 LS_MAT_BINARY_V7,
00055
00056 LS_NO_OPTION = 0
00057 };
00058
00059 class load_save_format
00060 {
00061 public:
00062 load_save_format (load_save_format_type t,
00063 load_save_format_options o = LS_NO_OPTION)
00064 : type (t), opts (o) { }
00065 operator int (void) const
00066 { return type; }
00067 int type, opts;
00068 };
00069
00070 extern void dump_octave_core (void);
00071
00072 extern int
00073 read_binary_file_header (std::istream& is, bool& swap,
00074 oct_mach_info::float_format& flt_fmt,
00075 bool quiet = false);
00076
00077 extern octave_value
00078 do_load (std::istream& stream, const std::string& orig_fname,
00079 load_save_format format, oct_mach_info::float_format flt_fmt,
00080 bool list_only, bool swap, bool verbose,
00081 const string_vector& argv, int argv_idx, int argc, int nargout);
00082
00083 extern void
00084 do_save (std::ostream& os, const symbol_table::symbol_record& sr,
00085 load_save_format fmt, bool save_as_floats);
00086
00087 extern void
00088 write_header (std::ostream& os, load_save_format format);
00089
00090 #endif