GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
load-save.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 1994-2013 John W. Eaton
4 
5 This file is part of Octave.
6 
7 Octave is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the
9 Free Software Foundation; either version 3 of the License, or (at your
10 option) any later version.
11 
12 Octave is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with Octave; see the file COPYING. If not, see
19 <http://www.gnu.org/licenses/>.
20 
21 */
22 
23 #if !defined (octave_load_save_h)
24 #define octave_load_save_h 1
25 
26 #include <iosfwd>
27 #include <string>
28 
29 #include "mach-info.h"
30 #include "symtab.h"
31 
32 class octave_value;
33 
34 // FIXME: maybe MAT5 and MAT7 should be options to MAT_BINARY.
35 // Similarly, save_as_floats may be an option for LS_BINARY, LS_HDF5 etc.
37 {
44 #ifdef HAVE_HDF5
46 #endif /* HAVE_HDF5 */
48 };
49 
51 {
52  // LS_MAT_ASCII options (not exclusive)
55  // LS_MAT_BINARY options
58  // zero means no option.
60 };
61 
63 {
64 public:
67  : type (t), opts (o) { }
68  operator int (void) const
69  { return type; }
70  int type, opts;
71 };
72 
73 extern void dump_octave_core (void);
74 
75 extern int
76 read_binary_file_header (std::istream& is, bool& swap,
78  bool quiet = false);
79 
80 extern octave_value
81 do_load (std::istream& stream, const std::string& orig_fname,
83  bool list_only, bool swap, bool verbose,
84  const string_vector& argv, int argv_idx, int argc, int nargout);
85 
86 extern OCTINTERP_API bool is_octave_data_file (const std::string& file);
87 
88 extern void
89 do_save (std::ostream& os, const symbol_table::symbol_record& sr,
90  load_save_format fmt, bool save_as_floats);
91 
92 extern void
93 write_header (std::ostream& os, load_save_format format);
94 
95 extern void octave_prepare_hdf5 (void);
96 
97 extern void octave_finalize_hdf5 (void);
98 
99 #endif