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